summaryrefslogtreecommitdiffstats
path: root/modules-available/dozmod/inc/pagedozmodusers.inc.php
diff options
context:
space:
mode:
authorChristian Hofmaier2017-10-27 16:49:13 +0200
committerChristian Hofmaier2017-10-27 16:49:13 +0200
commitf8778f213cb9f916fa56279c9e1cf6deb067b35c (patch)
tree4d951d85dab1a015ef120f189a229ed734f1ce32 /modules-available/dozmod/inc/pagedozmodusers.inc.php
parent[internetaccess] user is now checked if he's logged in before he can access t... (diff)
downloadslx-admin-f8778f213cb9f916fa56279c9e1cf6deb067b35c.tar.gz
slx-admin-f8778f213cb9f916fa56279c9e1cf6deb067b35c.tar.xz
slx-admin-f8778f213cb9f916fa56279c9e1cf6deb067b35c.zip
[dozmod] implemented new permission system to module for: deleting expired vm versions, sending testmails and saving mailconfig, resetting templates or saving them, saving runtimeconfig, giving users rights (when no permission, it will show another animation). Also fixed a design issue (dialog instead of modal).
Diffstat (limited to 'modules-available/dozmod/inc/pagedozmodusers.inc.php')
-rw-r--r--modules-available/dozmod/inc/pagedozmodusers.inc.php15
1 files changed, 13 insertions, 2 deletions
diff --git a/modules-available/dozmod/inc/pagedozmodusers.inc.php b/modules-available/dozmod/inc/pagedozmodusers.inc.php
index 8da07923..621f7d34 100644
--- a/modules-available/dozmod/inc/pagedozmodusers.inc.php
+++ b/modules-available/dozmod/inc/pagedozmodusers.inc.php
@@ -16,11 +16,22 @@ class Page_dozmod_users extends Page
protected function doAjax()
{
+ User::load();
+
$action = Request::post('action', '', 'string');
if ($action === 'setmail' || $action === 'setsu' || $action == 'setlogin') {
- $this->setUserOption($action);
+ if (User::hasPermission("users.".$action)) {
+ $this->setUserOption($action);
+ } else {
+ die("No permission.");
+ }
+
} elseif ($action === 'setorglogin') {
- $this->setOrgOption($action);
+ if (User::hasPermission("users.orglogin")) {
+ $this->setOrgOption($action);
+ } else {
+ die("No permission.");
+ }
} else {
die('No such action');
}