diff options
author | =Corey Hulen <corey@hulen.com> | 2015-09-11 09:39:28 -0700 |
---|---|---|
committer | =Corey Hulen <corey@hulen.com> | 2015-09-11 09:39:28 -0700 |
commit | e5e88d16049f4527eaab6b066c731fbe4247b574 (patch) | |
tree | 9d1af24a3337340de2487d8858780ced3bbecef9 /api/team.go | |
parent | 9a9f2808d6c40f6a661e7f75255ae0951e0615e2 (diff) | |
download | chat-e5e88d16049f4527eaab6b066c731fbe4247b574.tar.gz chat-e5e88d16049f4527eaab6b066c731fbe4247b574.tar.bz2 chat-e5e88d16049f4527eaab6b066c731fbe4247b574.zip |
Renaming ROLE_ADMIN to ROLE_TEAM_ADMIN
Diffstat (limited to 'api/team.go')
-rw-r--r-- | api/team.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/api/team.go b/api/team.go index 9288b86cb..8258fa929 100644 --- a/api/team.go +++ b/api/team.go @@ -477,7 +477,7 @@ func InviteMembers(c *Context, team *model.Team, user *model.User, invites []str sender := user.GetDisplayName() senderRole := "" - if model.IsInRole(user.Roles, model.ROLE_ADMIN) || model.IsInRole(user.Roles, model.ROLE_SYSTEM_ADMIN) { + if model.IsInRole(user.Roles, model.ROLE_TEAM_ADMIN) || model.IsInRole(user.Roles, model.ROLE_SYSTEM_ADMIN) { senderRole = "administrator" } else { senderRole = "member" @@ -536,7 +536,7 @@ func updateTeamDisplayName(c *Context, w http.ResponseWriter, r *http.Request) { return } - if !model.IsInRole(c.Session.Roles, model.ROLE_ADMIN) { + if !model.IsInRole(c.Session.Roles, model.ROLE_TEAM_ADMIN) { c.Err = model.NewAppError("updateTeamDisplayName", "You do not have the appropriate permissions", "userId="+c.Session.UserId) c.Err.StatusCode = http.StatusForbidden return @@ -576,7 +576,7 @@ func updateValetFeature(c *Context, w http.ResponseWriter, r *http.Request) { return } - if !model.IsInRole(c.Session.Roles, model.ROLE_ADMIN) { + if !model.IsInRole(c.Session.Roles, model.ROLE_TEAM_ADMIN) { c.Err = model.NewAppError("updateValetFeature", "You do not have the appropriate permissions", "userId="+c.Session.UserId) c.Err.StatusCode = http.StatusForbidden return |