From 7d31f3a271d933b8c276602d9fb77fd5d22055de Mon Sep 17 00:00:00 2001 From: Christopher Speller Date: Wed, 30 Sep 2015 11:30:11 -0400 Subject: Fixing some locations to use the IsTeamAdmin function which properly checks for system admin permissions. --- api/user.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'api/user.go') diff --git a/api/user.go b/api/user.go index 92a77e68a..a5c3fca2b 100644 --- a/api/user.go +++ b/api/user.go @@ -969,7 +969,7 @@ func updateRoles(c *Context, w http.ResponseWriter, r *http.Request) { return } - if !model.IsInRole(c.Session.Roles, model.ROLE_TEAM_ADMIN) && !c.IsSystemAdmin() { + if !c.IsTeamAdmin() { c.Err = model.NewAppError("updateRoles", "You do not have the appropriate permissions", "userId="+user_id) c.Err.StatusCode = http.StatusForbidden return @@ -1066,7 +1066,7 @@ func updateActive(c *Context, w http.ResponseWriter, r *http.Request) { return } - if !model.IsInRole(c.Session.Roles, model.ROLE_TEAM_ADMIN) && !c.IsSystemAdmin() { + if !c.IsTeamAdmin() { c.Err = model.NewAppError("updateActive", "You do not have the appropriate permissions", "userId="+user_id) c.Err.StatusCode = http.StatusForbidden return -- cgit v1.2.3-1-g7c22