diff options
author | Christopher Speller <crspeller@gmail.com> | 2016-11-01 16:16:16 -0400 |
---|---|---|
committer | Corey Hulen <corey@hulen.com> | 2016-11-01 13:16:16 -0700 |
commit | 420bc367fa10047dc40c7e5165f6e8f05438957c (patch) | |
tree | f9be4d10eb7dfd92d045f681370d01ea9417b782 /api/command.go | |
parent | b0f38f8a84ae0b7cba43c7d12a19f8f3cb79e9b0 (diff) | |
download | chat-420bc367fa10047dc40c7e5165f6e8f05438957c.tar.gz chat-420bc367fa10047dc40c7e5165f6e8f05438957c.tar.bz2 chat-420bc367fa10047dc40c7e5165f6e8f05438957c.zip |
Fixing permissions issue when deleting slash commands (#4414)
Diffstat (limited to 'api/command.go')
-rw-r--r-- | api/command.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/api/command.go b/api/command.go index 5cf9d730b..e71661a67 100644 --- a/api/command.go +++ b/api/command.go @@ -415,7 +415,7 @@ func deleteCommand(c *Context, w http.ResponseWriter, r *http.Request) { c.Err = result.Err return } else { - if c.TeamId != result.Data.(*model.Command).TeamId || (c.Session.UserId != result.Data.(*model.Command).CreatorId && HasPermissionToCurrentTeamContext(c, model.PERMISSION_MANAGE_OTHERS_SLASH_COMMANDS)) { + if c.TeamId != result.Data.(*model.Command).TeamId || (c.Session.UserId != result.Data.(*model.Command).CreatorId && !HasPermissionToCurrentTeamContext(c, model.PERMISSION_MANAGE_OTHERS_SLASH_COMMANDS)) { c.LogAudit("fail - inappropriate permissions") c.Err = model.NewLocAppError("deleteCommand", "api.command.delete.app_error", nil, "user_id="+c.Session.UserId) return |