summaryrefslogtreecommitdiffstats
path: root/api/webhook.go
diff options
context:
space:
mode:
Diffstat (limited to 'api/webhook.go')
-rw-r--r--api/webhook.go2
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