diff --git a/common.php b/common.php index 2309585..337f448 100755 --- a/common.php +++ b/common.php @@ -153,6 +153,14 @@ // Check Function Availability ////////////////////////////////////////////////////////////////// + function checkAccess() { + return file_exists(BASE_PATH . "/data/" . $_SESSION['user'] . '_acl.php')?false:true; + } + + ////////////////////////////////////////////////////////////////// + // Check Function Availability + ////////////////////////////////////////////////////////////////// + function isAvailable($func) { if (ini_get('safe_mode')) return false; $disabled = ini_get('disable_functions'); diff --git a/components/project/controller.php b/components/project/controller.php index 289e070..28f2462 100755 --- a/components/project/controller.php +++ b/components/project/controller.php @@ -52,13 +52,15 @@ ////////////////////////////////////////////////////////////////// if($_GET['action']=='create'){ - $Project->name = $_GET['project_name']; - // Git Clone? - if(!empty($_GET['git_repo'])){ - $Project->gitrepo = $_GET['git_repo']; - $Project->gitbranch = $_GET['git_branch']; + if(checkAccess()) { + $Project->name = $_GET['project_name']; + // Git Clone? + if(!empty($_GET['git_repo'])){ + $Project->gitrepo = $_GET['git_repo']; + $Project->gitbranch = $_GET['git_branch']; + } + $Project->Create(); } - $Project->Create(); } ////////////////////////////////////////////////////////////////// @@ -66,8 +68,10 @@ ////////////////////////////////////////////////////////////////// if($_GET['action']=='delete'){ - $Project->path = $_GET['project_path']; - $Project->Delete(); + if(checkAccess()) { + $Project->path = $_GET['project_path']; + $Project->Delete(); + } } ////////////////////////////////////////////////////////////////// diff --git a/components/project/dialog.php b/components/project/dialog.php index 8399a93..3f6f60f 100755 --- a/components/project/dialog.php +++ b/components/project/dialog.php @@ -75,7 +75,7 @@
You can not edit the user list