From b055b3e666111b866b6eb8d4fa3ad4d329a11692 Mon Sep 17 00:00:00 2001 From: j Date: Tue, 7 Feb 2017 14:32:41 +0100 Subject: [PATCH] only show manage home if its used --- pandora/config.0xdb.jsonc | 2 +- static/js/mainMenu.js | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/pandora/config.0xdb.jsonc b/pandora/config.0xdb.jsonc index 4c444c047..e5758b7d2 100644 --- a/pandora/config.0xdb.jsonc +++ b/pandora/config.0xdb.jsonc @@ -56,7 +56,7 @@ "canImportItems": {}, "canManageDocuments": {"staff": true, "admin": true}, "canManageEntities": {"staff": true, "admin": true}, - "canManageHome": {"staff": true, "admin": true}, + "canManageHome": {}, "canManagePlacesAndEvents": {"staff": true, "admin": true}, "canManageTitlesAndNames": {"staff": true, "admin": true}, "canManageUsers": {"staff": true, "admin": true}, diff --git a/static/js/mainMenu.js b/static/js/mainMenu.js index 4e19ead8d..104873da2 100644 --- a/static/js/mainMenu.js +++ b/static/js/mainMenu.js @@ -230,7 +230,9 @@ pandora.ui.mainMenu = function() { { id: 'places', title: Ox._('Manage Places...'), disabled: !pandora.site.capabilities.canManagePlacesAndEvents[pandora.user.level] }, { id: 'events', title: Ox._('Manage Events...'), disabled: !pandora.site.capabilities.canManagePlacesAndEvents[pandora.user.level] }, {}, - { id: 'managehome', title: Ox._('Manage Home...'), disabled: !pandora.site.capabilities.canManageHome[pandora.user.level] }, + Ox.isEmpty(pandora.site.capabilities.canManageHome) ? [] : [ + { id: 'managehome', title: Ox._('Manage Home...'), disabled: !pandora.site.capabilities.canManageHome[pandora.user.level] } + ], { id: 'users', title: Ox._('Manage Users...'), disabled: !pandora.site.capabilities.canManageUsers[pandora.user.level] }, { id: 'statistics', title: Ox._('Statistics...'), disabled: !pandora.site.capabilities.canManageUsers[pandora.user.level] }, {},