// Copyright (c) 2015 Mattermost, Inc. All Rights Reserved. // See License.txt for license information. var UserStore = require('../stores/user_store.jsx'); var client = require('../utils/client.jsx'); var utils = require('../utils/utils.jsx'); export default class SidebarRightMenu extends React.Component { componentDidMount() { $('.sidebar--left .dropdown-menu').perfectScrollbar(); } constructor(props) { super(props); this.handleLogoutClick = this.handleLogoutClick.bind(this); } handleLogoutClick(e) { e.preventDefault(); client.logout(); } render() { var teamLink = ''; var inviteLink = ''; var teamSettingsLink = ''; var manageLink = ''; var consoleLink = ''; var currentUser = UserStore.getCurrentUser(); var isAdmin = false; var isSystemAdmin = false; if (currentUser != null) { isAdmin = utils.isAdmin(currentUser.roles); isSystemAdmin = utils.isSystemAdmin(currentUser.roles); inviteLink = (