Этот коммит содержится в:
=Corey Hulen
2015-09-04 11:59:10 -07:00
родитель 05d95d80a8
Коммит 58d0d9afd2
11 изменённых файлов: 473 добавлений и 97 удалений

Просмотреть файл

@@ -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