diff options
-rw-r--r-- | include/functions_user.inc.php | 9 | ||||
-rw-r--r-- | plugins/LocalFilesEditor/admin.php | 2 |
2 files changed, 10 insertions, 1 deletions
diff --git a/include/functions_user.inc.php b/include/functions_user.inc.php index f9b31e51c..6a63c83e4 100644 --- a/include/functions_user.inc.php +++ b/include/functions_user.inc.php @@ -1236,6 +1236,15 @@ function check_status($access_type, $user_status = '') } /* + * Return if user is, at least, a webmaster + * @return bool +*/ + function is_webmaster($user_status = '') +{ + return is_autorize_status(ACCESS_WEBMASTER, $user_status); +} + +/* * Return if current user is an adviser * @return bool */ diff --git a/plugins/LocalFilesEditor/admin.php b/plugins/LocalFilesEditor/admin.php index 0b000f2ab..b0837345f 100644 --- a/plugins/LocalFilesEditor/admin.php +++ b/plugins/LocalFilesEditor/admin.php @@ -294,7 +294,7 @@ if (isset($_POST['restore']) and !is_adviser()) // +-----------------------------------------------------------------------+ if (isset($_POST['submit']) and !is_adviser()) { - if ($user['status'] != 'webmaster') + if (!is_webmaster()) { array_push($page['errors'], l10n('locfiledit_webmaster_only')); } |