diff --git a/inc/admin_functions.inc.php b/inc/admin_functions.inc.php index 3cdac183..6ba71df4 100644 --- a/inc/admin_functions.inc.php +++ b/inc/admin_functions.inc.php @@ -715,38 +715,12 @@ function hesk_okCategory($cat,$error=1,$user_isadmin=false,$user_cat=false) function hesk_checkPermission($feature,$showerror=1) { global $hesklang; - /* Check if this is for managing settings */ - if ($feature == 'can_manage_settings') - { - if ($_SESSION['can_manage_settings']) { - return true; - } else { - if ($showerror) { - hesk_error($hesklang['no_permission'].'

 

'.$hesklang['click_login'].''); - } else { - return false; - } - } - } - /* Admins have full access to all features */ if ($_SESSION['isadmin']) { return true; } - if ($feature == 'can_manage_email_templates') { - if ($_SESSION['can_manage_email_templates']) { - return true; - } else { - if ($showerror) { - hesk_error($hesklang['no_permission'].'

 

'.$hesklang['click_login'].''); - } else { - return false; - } - } - } - /* Check other staff for permissions */ if (strpos($_SESSION['heskprivileges'], $feature) === false) {