summaryrefslogtreecommitdiffstats
path: root/api/channel.go
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2015-09-14 08:58:53 -0400
committerChristopher Speller <crspeller@gmail.com>2015-09-14 08:58:53 -0400
commitc3742aef71801544172cf77a46d52835594096a4 (patch)
tree76b3aacf1ee6da724201ea5411bef068cce3b26a /api/channel.go
parent75721b5cb5ea19c1d6754adcc82891fa888fcacf (diff)
parent714f47e015adf4a455d29cbddfb5f58f84d9973e (diff)
downloadchat-c3742aef71801544172cf77a46d52835594096a4.tar.gz
chat-c3742aef71801544172cf77a46d52835594096a4.tar.bz2
chat-c3742aef71801544172cf77a46d52835594096a4.zip
Merge pull request #648 from mattermost/PLT-12
PLT-12: Work in progress for Admin Console UI
Diffstat (limited to 'api/channel.go')
-rw-r--r--api/channel.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/api/channel.go b/api/channel.go
index b40366719..63acaa8d1 100644
--- a/api/channel.go
+++ b/api/channel.go
@@ -191,7 +191,7 @@ func updateChannel(c *Context, w http.ResponseWriter, r *http.Request) {
return
}
- if !strings.Contains(channelMember.Roles, model.CHANNEL_ROLE_ADMIN) && !strings.Contains(c.Session.Roles, model.ROLE_ADMIN) {
+ if !strings.Contains(channelMember.Roles, model.CHANNEL_ROLE_ADMIN) && !strings.Contains(c.Session.Roles, model.ROLE_TEAM_ADMIN) {
c.Err = model.NewAppError("updateChannel", "You do not have the appropriate permissions", "")
c.Err.StatusCode = http.StatusForbidden
return
@@ -514,7 +514,7 @@ func deleteChannel(c *Context, w http.ResponseWriter, r *http.Request) {
return
}
- if !strings.Contains(channelMember.Roles, model.CHANNEL_ROLE_ADMIN) && !strings.Contains(c.Session.Roles, model.ROLE_ADMIN) {
+ if !strings.Contains(channelMember.Roles, model.CHANNEL_ROLE_ADMIN) && !strings.Contains(c.Session.Roles, model.ROLE_TEAM_ADMIN) {
c.Err = model.NewAppError("deleteChannel", "You do not have the appropriate permissions", "")
c.Err.StatusCode = http.StatusForbidden
return
@@ -756,7 +756,7 @@ func removeChannelMember(c *Context, w http.ResponseWriter, r *http.Request) {
return
}
- if !strings.Contains(channelMember.Roles, model.CHANNEL_ROLE_ADMIN) && !strings.Contains(c.Session.Roles, model.ROLE_ADMIN) {
+ if !strings.Contains(channelMember.Roles, model.CHANNEL_ROLE_ADMIN) && !strings.Contains(c.Session.Roles, model.ROLE_TEAM_ADMIN) {
c.Err = model.NewAppError("updateChannel", "You do not have the appropriate permissions ", "")
c.Err.StatusCode = http.StatusForbidden
return