diff options
author | Jesús Espino <jespinog@gmail.com> | 2018-02-19 12:13:29 +0100 |
---|---|---|
committer | George Goldberg <george@gberg.me> | 2018-02-19 11:13:29 +0000 |
commit | 8891fa2a5e9e08eb9fa99ec163c47a6e9761a816 (patch) | |
tree | 1cb5b375cbedf397d71ad8df3d009e4b5efb1357 /api | |
parent | 0e718a632a616bcfec4378f512182245b68f4fd8 (diff) | |
download | chat-8891fa2a5e9e08eb9fa99ec163c47a6e9761a816.tar.gz chat-8891fa2a5e9e08eb9fa99ec163c47a6e9761a816.tar.bz2 chat-8891fa2a5e9e08eb9fa99ec163c47a6e9761a816.zip |
MM-8827: Add ADD_REACTION, REMOVE_REACTION and REMOVE_OTHERS_REACTIONS permissions (#8300)
Diffstat (limited to 'api')
-rw-r--r-- | api/reaction.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/api/reaction.go b/api/reaction.go index 991044cda..812c9f582 100644 --- a/api/reaction.go +++ b/api/reaction.go @@ -36,8 +36,8 @@ func saveReaction(c *Context, w http.ResponseWriter, r *http.Request) { return } - if !c.App.SessionHasPermissionToChannel(c.Session, channelId, model.PERMISSION_READ_CHANNEL) { - c.SetPermissionError(model.PERMISSION_READ_CHANNEL) + if !c.App.SessionHasPermissionToChannel(c.Session, channelId, model.PERMISSION_ADD_REACTION) { + c.SetPermissionError(model.PERMISSION_ADD_REACTION) return } @@ -87,8 +87,8 @@ func deleteReaction(c *Context, w http.ResponseWriter, r *http.Request) { return } - if !c.App.SessionHasPermissionToChannel(c.Session, channelId, model.PERMISSION_READ_CHANNEL) { - c.SetPermissionError(model.PERMISSION_READ_CHANNEL) + if !c.App.SessionHasPermissionToChannel(c.Session, channelId, model.PERMISSION_REMOVE_REACTION) { + c.SetPermissionError(model.PERMISSION_REMOVE_REACTION) return } |