From 58d0d9afd286afd715e9f04825e1305045d404e2 Mon Sep 17 00:00:00 2001 From: =Corey Hulen Date: Fri, 4 Sep 2015 11:59:10 -0700 Subject: Adding cmd line options --- api/post.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'api/post.go') 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 -- cgit v1.2.3-1-g7c22