From c96d4cb243db991075f456c88bf397c8580619b5 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Tue, 19 Dec 2017 12:58:44 +0100 Subject: [dozmod] Fix permission handling in mail template editor --- modules-available/dozmod/inc/pagemailtemplates.inc.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'modules-available') 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) -- cgit v1.2.3-55-g7522