diff options
author | Christopher Speller <crspeller@gmail.com> | 2015-09-30 15:38:15 -0400 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2015-09-30 15:38:15 -0400 |
commit | 2d3ddfd467036935bc983cd77b4ab1243ac58cb6 (patch) | |
tree | ed74e719e3d14857808a2dae5c5a08ebc35ed18d /api/post.go | |
parent | 46f86e7076a1dec6717a959299a08289a5cc54ac (diff) | |
parent | ad92a90b02fdcea3846376747cedf8c81e5a2d22 (diff) | |
download | chat-2d3ddfd467036935bc983cd77b4ab1243ac58cb6.tar.gz chat-2d3ddfd467036935bc983cd77b4ab1243ac58cb6.tar.bz2 chat-2d3ddfd467036935bc983cd77b4ab1243ac58cb6.zip |
Merge release branch 'release-1.0.0'
Diffstat (limited to 'api/post.go')
-rw-r--r-- | api/post.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/api/post.go b/api/post.go index 0379f6af5..2b683fb7d 100644 --- a/api/post.go +++ b/api/post.go @@ -633,7 +633,7 @@ func deletePost(c *Context, w http.ResponseWriter, r *http.Request) { post := result.Data.(*model.PostList).Posts[postId] - if !c.HasPermissionsToChannel(cchan, "deletePost") && !c.IsTeamAdmin(post.UserId) { + if !c.HasPermissionsToChannel(cchan, "deletePost") && !c.IsTeamAdmin() { return } @@ -648,7 +648,7 @@ func deletePost(c *Context, w http.ResponseWriter, r *http.Request) { return } - if post.UserId != c.Session.UserId && !model.IsInRole(c.Session.Roles, model.ROLE_TEAM_ADMIN) { + if post.UserId != c.Session.UserId && !c.IsTeamAdmin() { c.Err = model.NewAppError("deletePost", "You do not have the appropriate permissions", "") c.Err.StatusCode = http.StatusForbidden return |