From 495f98a65f5d00a4a9ea01ad51db6528a6b9e54e Mon Sep 17 00:00:00 2001 From: rr- Date: Tue, 23 Aug 2016 22:23:59 +0200 Subject: [PATCH] client/auth: fix edit sidebar for management only --- client/html/post.tpl | 2 +- client/js/controllers/post_controller.js | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/client/html/post.tpl b/client/html/post.tpl index f93f5870..594611c9 100644 --- a/client/html/post.tpl +++ b/client/html/post.tpl @@ -36,7 +36,7 @@ Back to view mode <% } else { %> - <% if (ctx.canEditPosts) { %> + <% if (ctx.canEditPosts || ctx.canDeletePosts || ctx.canFeaturePosts) { %> <% } else { %> diff --git a/client/js/controllers/post_controller.js b/client/js/controllers/post_controller.js index c1228b66..ec847444 100644 --- a/client/js/controllers/post_controller.js +++ b/client/js/controllers/post_controller.js @@ -48,6 +48,8 @@ class PostController { nextPostId: aroundResponse.next ? aroundResponse.next.id : null, prevPostId: aroundResponse.prev ? aroundResponse.prev.id : null, canEditPosts: api.hasPrivilege('posts:edit'), + canDeletePosts: api.hasPrivilege('posts:delete'), + canFeaturePosts: api.hasPrivilege('posts:feature'), canListComments: api.hasPrivilege('comments:list'), canCreateComments: api.hasPrivilege('comments:create'), parameters: parameters,