aboutsummaryrefslogtreecommitdiff
path: root/client/js/controllers/home_controller.js
diff options
context:
space:
mode:
Diffstat (limited to 'client/js/controllers/home_controller.js')
-rw-r--r--client/js/controllers/home_controller.js11
1 files changed, 10 insertions, 1 deletions
diff --git a/client/js/controllers/home_controller.js b/client/js/controllers/home_controller.js
index 25800d0..cd44a61 100644
--- a/client/js/controllers/home_controller.js
+++ b/client/js/controllers/home_controller.js
@@ -24,13 +24,22 @@ class HomeController {
api.get('/info')
.then(response => {
this._homeView.render({
+ canListPosts: api.hasPrivilege('posts:list'),
+ canListComments: api.hasPrivilege('comments:list'),
+ canListTags: api.hasPrivilege('tags:list'),
+ canListUsers: api.hasPrivilege('users:list'),
diskUsage: response.diskUsage,
postCount: response.postCount,
featuredPost: response.featuredPost,
});
},
response => {
- this._homeView.render({});
+ this._homeView.render({
+ canListPosts: api.hasPrivilege('posts:list'),
+ canListComments: api.hasPrivilege('comments:list'),
+ canListTags: api.hasPrivilege('tags:list'),
+ canListUsers: api.hasPrivilege('users:list'),
+ });
events.notify(events.Error, response.description);
});
}

© 2015 - 2026 Jakob L. Kreuze