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