From 6c75662b824491a20a757a5eec59556a866374b5 Mon Sep 17 00:00:00 2001
From: Corey Hulen <corey@hulen.com>
Date: Fri, 6 May 2016 11:28:22 -0700
Subject: PLT-2697 Fixing team admins (#2900)

* PLT-2697 Fixing team admins

* Fixing eslint error

* Fixing loc issues

* Fixing func

* Fixing func
---
 webapp/components/sidebar_right_menu.jsx | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

(limited to 'webapp/components/sidebar_right_menu.jsx')

diff --git a/webapp/components/sidebar_right_menu.jsx b/webapp/components/sidebar_right_menu.jsx
index a48dcade6..b36d84b79 100644
--- a/webapp/components/sidebar_right_menu.jsx
+++ b/webapp/components/sidebar_right_menu.jsx
@@ -7,6 +7,7 @@ import UserSettingsModal from './user_settings/user_settings_modal.jsx';
 import AboutBuildModal from './about_build_modal.jsx';
 
 import UserStore from 'stores/user_store.jsx';
+import TeamStore from 'stores/team_store.jsx';
 import PreferenceStore from 'stores/preference_store.jsx';
 
 import * as GlobalActions from 'action_creators/global_actions.jsx';
@@ -77,8 +78,8 @@ export default class SidebarRightMenu extends React.Component {
         var isSystemAdmin = false;
 
         if (currentUser != null) {
-            isAdmin = Utils.isAdmin(currentUser.roles);
-            isSystemAdmin = Utils.isSystemAdmin(currentUser.roles);
+            isAdmin = TeamStore.isTeamAdminForCurrentTeam() || UserStore.isSystemAdminForCurrentUser();
+            isSystemAdmin = UserStore.isSystemAdminForCurrentUser();
 
             inviteLink = (
                 <li>
-- 
cgit v1.2.3-1-g7c22

