diff options
author | Christopher Speller <crspeller@gmail.com> | 2015-09-30 14:52:51 -0400 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2015-09-30 14:52:51 -0400 |
commit | e99e93fafbb6c974129ba09a35ddb85e2102f00d (patch) | |
tree | 6836aebf1b99083a501c4c3305326237625ceb3a /api/webhook.go | |
parent | 6a9cfe2f241f0eed8d6b2c943a8fd04cc1a14019 (diff) | |
parent | 7d31f3a271d933b8c276602d9fb77fd5d22055de (diff) | |
download | chat-e99e93fafbb6c974129ba09a35ddb85e2102f00d.tar.gz chat-e99e93fafbb6c974129ba09a35ddb85e2102f00d.tar.bz2 chat-e99e93fafbb6c974129ba09a35ddb85e2102f00d.zip |
Merge pull request #884 from mattermost/permissions-fix
Permissions fixes. Fixes PLT-487
Diffstat (limited to 'api/webhook.go')
-rw-r--r-- | api/webhook.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/api/webhook.go b/api/webhook.go index b67655ff5..e694b202c 100644 --- a/api/webhook.go +++ b/api/webhook.go @@ -86,7 +86,7 @@ func deleteIncomingHook(c *Context, w http.ResponseWriter, r *http.Request) { c.Err = result.Err return } else { - if c.Session.UserId != result.Data.(*model.IncomingWebhook).UserId && !model.IsInRole(c.Session.Roles, model.ROLE_TEAM_ADMIN) { + if c.Session.UserId != result.Data.(*model.IncomingWebhook).UserId && !c.IsTeamAdmin() { c.LogAudit("fail - inappropriate conditions") c.Err = model.NewAppError("deleteIncomingHook", "Inappropriate permissions to delete incoming webhook", "user_id="+c.Session.UserId) return |