summaryrefslogtreecommitdiffstats
path: root/modules-available/dozmod
diff options
context:
space:
mode:
authorSimon Rettberg2017-12-19 12:58:44 +0100
committerSimon Rettberg2017-12-19 12:58:44 +0100
commitc96d4cb243db991075f456c88bf397c8580619b5 (patch)
tree48163b589c1c4ae933b794f042522c21748c61c7 /modules-available/dozmod
parentMerge branch 'master' of dnbd3:openslx-ng/slx-admin (diff)
downloadslx-admin-c96d4cb243db991075f456c88bf397c8580619b5.tar.gz
slx-admin-c96d4cb243db991075f456c88bf397c8580619b5.tar.xz
slx-admin-c96d4cb243db991075f456c88bf397c8580619b5.zip
[dozmod] Fix permission handling in mail template editor
Diffstat (limited to 'modules-available/dozmod')
-rw-r--r--modules-available/dozmod/inc/pagemailtemplates.inc.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/modules-available/dozmod/inc/pagemailtemplates.inc.php b/modules-available/dozmod/inc/pagemailtemplates.inc.php
index b7b5a8d4..ff47977f 100644
--- a/modules-available/dozmod/inc/pagemailtemplates.inc.php
+++ b/modules-available/dozmod/inc/pagemailtemplates.inc.php
@@ -59,14 +59,16 @@ class Page_mail_templates extends Page
$t['modified'] = !$t['original'];
$t['conflict'] = !$t['original'] && $t['edit_version'] < $t['version'];
}
-
}
+
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]);
+ Render::addTemplate('templates', [
+ 'templates' => $this->templates,
+ 'allowedReset' => User::hasPermission("templates.reset"),
+ 'allowedSave' => User::hasPermission("templates.save"),
+ ]);
}
private function forcmp($string)