diff options
| author | rr- | 2016-08-23 22:23:59 +0200 |
|---|---|---|
| committer | rr- | 2016-08-23 23:14:05 +0200 |
| commit | 495f98a65f5d00a4a9ea01ad51db6528a6b9e54e (patch) | |
| tree | 8445e2330d7b8555221f22ce43d9c198d0821bed /client | |
| parent | d753bdfab122dffcbbe7ece397687d0f7ccef7e8 (diff) | |
client/auth: fix edit sidebar for management only
Diffstat (limited to 'client')
| -rw-r--r-- | client/html/post.tpl | 2 | ||||
| -rw-r--r-- | client/js/controllers/post_controller.js | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/client/html/post.tpl b/client/html/post.tpl index f93f587..594611c 100644 --- a/client/html/post.tpl +++ b/client/html/post.tpl @@ -36,7 +36,7 @@ <span class='vim-nav-hint'>Back to view mode</span> </a> <% } else { %> - <% if (ctx.canEditPosts) { %> + <% if (ctx.canEditPosts || ctx.canDeletePosts || ctx.canFeaturePosts) { %> <a href='<%= ctx.getPostEditUrl(ctx.post.id, ctx.parameters) %>'> <% } else { %> <a class='inactive'> diff --git a/client/js/controllers/post_controller.js b/client/js/controllers/post_controller.js index c1228b6..ec84744 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, |