summaryrefslogtreecommitdiffstats
path: root/api/post.go
diff options
context:
space:
mode:
author=Corey Hulen <corey@hulen.com>2015-09-04 11:59:10 -0700
committer=Corey Hulen <corey@hulen.com>2015-09-04 11:59:10 -0700
commit58d0d9afd286afd715e9f04825e1305045d404e2 (patch)
tree10615aa68c68106684503fb18ae4e4ef8998bc22 /api/post.go
parent05d95d80a896d14474c7f7384d67b9edd524b922 (diff)
downloadchat-58d0d9afd286afd715e9f04825e1305045d404e2.tar.gz
chat-58d0d9afd286afd715e9f04825e1305045d404e2.tar.bz2
chat-58d0d9afd286afd715e9f04825e1305045d404e2.zip
Adding cmd line options
Diffstat (limited to 'api/post.go')
-rw-r--r--api/post.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/api/post.go b/api/post.go
index 5363fdf79..f969dd031 100644
--- a/api/post.go
+++ b/api/post.go
@@ -716,7 +716,7 @@ func deletePost(c *Context, w http.ResponseWriter, r *http.Request) {
return
}
- if post.UserId != c.Session.UserId && !strings.Contains(c.Session.Roles, model.ROLE_ADMIN) {
+ if post.UserId != c.Session.UserId && !model.IsInRole(c.Session.Roles, model.ROLE_ADMIN) {
c.Err = model.NewAppError("deletePost", "You do not have the appropriate permissions", "")
c.Err.StatusCode = http.StatusForbidden
return