Skip to content
This repository was archived by the owner on Nov 25, 2020. It is now read-only.

Commit 2a59764

Browse files
committed
Merge pull request #2 from andypmuc/Disable_admin_functions
Disable admin functions
2 parents 09b5f1a + 5f2ea30 commit 2a59764

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

core/src/conf/bootstrap_context.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@
4141

4242
define("AJXP_EXEC", true);
4343

44+
// If set to true the gui functions of admins (config of app & developer ressources) will be disabled
45+
define("AJXP_ADMIN_DISABLE", false);
46+
4447
// APPLICATION PATHES CONFIGURATION
4548
define("AJXP_DATA_PATH", AJXP_INSTALL_PATH."/data");
4649
define("AJXP_CACHE_DIR", AJXP_DATA_PATH."/cache");

core/src/plugins/access.ajxp_conf/class.ajxp_confAccessDriver.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,10 @@ public function switchAction($action, $httpVars, $fileVars)
391391
unset($rootNodes["admin"]);
392392
unset($rootNodes["developer"]);
393393
}
394+
if (AJXP_ADMIN_DISABLE) {
395+
unset($rootNodes["config"]);
396+
unset($rootNodes["developer"]);
397+
}
394398
AJXP_Controller::applyHook("ajxp_conf.list_config_nodes", array(&$rootNodes));
395399
$parentName = "";
396400
$dir = trim(AJXP_Utils::decodeSecureMagic((isset($httpVars["dir"])?$httpVars["dir"]:"")), " /");

0 commit comments

Comments
 (0)