diff options
author | Christian Hofmaier | 2017-12-07 18:20:06 +0100 |
---|---|---|
committer | Christian Hofmaier | 2017-12-07 18:20:06 +0100 |
commit | 0ba49ba63e81bf2f4b68f83c035bf0bef37bb3be (patch) | |
tree | fccf8e5b4db5c6a07286f936f23249966bedee84 /modules-available/dozmod/inc/pagemailtemplates.inc.php | |
parent | [sysconfig] Overview: Make mouseover highlighting work in the other direction... (diff) | |
download | slx-admin-0ba49ba63e81bf2f4b68f83c035bf0bef37bb3be.tar.gz slx-admin-0ba49ba63e81bf2f4b68f83c035bf0bef37bb3be.tar.xz slx-admin-0ba49ba63e81bf2f4b68f83c035bf0bef37bb3be.zip |
[dozmod] reworked permission system from "click and you get error" to "button is disabled due to lack of permission" + in log as there is no button, the links to the user/target are disabled (not clickable).
Diffstat (limited to 'modules-available/dozmod/inc/pagemailtemplates.inc.php')
-rw-r--r-- | modules-available/dozmod/inc/pagemailtemplates.inc.php | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/modules-available/dozmod/inc/pagemailtemplates.inc.php b/modules-available/dozmod/inc/pagemailtemplates.inc.php index 90734a50..b7b5a8d4 100644 --- a/modules-available/dozmod/inc/pagemailtemplates.inc.php +++ b/modules-available/dozmod/inc/pagemailtemplates.inc.php @@ -15,16 +15,10 @@ class Page_mail_templates extends Page } elseif ($action === 'save') { if (User::hasPermission("templates.save")) { $this->handleSave(); - } else { - Message::addError('main.no-permission'); - Util::redirect('?do=dozmod§ion=templates'); } } elseif ($action === 'reset') { if(User::hasPermission("templates.reset")) { $this->handleReset(); - } else { - Message::addError('main.no-permission'); - Util::redirect('?do=dozmod§ion=templates'); } } else { Message::addError('main.invalid-action', $action); @@ -70,6 +64,8 @@ class Page_mail_templates extends Page protected function doRender() { $this->enrichHtml(); + $this->templates['allowedReset'] = User::hasPermission("templates.reset"); + $this->templates['allowedSave'] = User::hasPermission("templates.save"); Render::addTemplate('templates', ['templates' => $this->templates]); } |