From 392f46ef73cd4b69b423eba0196ebb88ec0f4838 Mon Sep 17 00:00:00 2001 From: Victor LABORIE Date: Sat, 16 Dec 2017 18:00:54 +0100 Subject: [PATCH] Only superadmin can enable/disable a domain --- htdocs/admin.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/htdocs/admin.php b/htdocs/admin.php index 5e5b16e..574c35b 100644 --- a/htdocs/admin.php +++ b/htdocs/admin.php @@ -38,7 +38,7 @@ if (!empty($_POST['delete'])) { print ''; } -if (!empty($_POST['isactive'])) { +if (!empty($_POST['isactive']) && $server->isSuperAdmin()) { $active = ($_POST['isactive'] == "TRUE") ? true : false; try { $domain->update($active); @@ -53,10 +53,12 @@ if (!empty($_POST['isactive'])) {
getName().'">'; - if (!$domain->isactive()) { - print '   '; - } else { - print '   '; + if ($server->isSuperAdmin()) { + if (!$domain->isactive()) { + print '   '; + } else { + print '   '; + } } ?>