summaryrefslogtreecommitdiffstats
path: root/api/user.go
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2015-09-30 15:38:15 -0400
committerChristopher Speller <crspeller@gmail.com>2015-09-30 15:38:15 -0400
commit2d3ddfd467036935bc983cd77b4ab1243ac58cb6 (patch)
treeed74e719e3d14857808a2dae5c5a08ebc35ed18d /api/user.go
parent46f86e7076a1dec6717a959299a08289a5cc54ac (diff)
parentad92a90b02fdcea3846376747cedf8c81e5a2d22 (diff)
downloadchat-2d3ddfd467036935bc983cd77b4ab1243ac58cb6.tar.gz
chat-2d3ddfd467036935bc983cd77b4ab1243ac58cb6.tar.bz2
chat-2d3ddfd467036935bc983cd77b4ab1243ac58cb6.zip
Merge release branch 'release-1.0.0'
Diffstat (limited to 'api/user.go')
-rw-r--r--api/user.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/api/user.go b/api/user.go
index e140bc8cf..ed3576a30 100644
--- a/api/user.go
+++ b/api/user.go
@@ -973,7 +973,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
@@ -1070,7 +1070,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