mirror of
https://github.com/Piwigo/Piwigo.git
synced 2025-04-29 04:39:56 +03:00
Add function is_webmaster (like is_admin function)
Add on ignore list the directory local/personal git-svn-id: http://piwigo.org/svn/trunk@5272 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
parent
c0879165c6
commit
a6c771547d
2 changed files with 10 additions and 1 deletions
|
@ -1235,6 +1235,15 @@ function check_status($access_type, $user_status = '')
|
||||||
return is_autorize_status(ACCESS_ADMINISTRATOR, $user_status);
|
return is_autorize_status(ACCESS_ADMINISTRATOR, $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 if current user is an adviser
|
||||||
* @return bool
|
* @return bool
|
||||||
|
|
|
@ -294,7 +294,7 @@ if (isset($_POST['restore']) and !is_adviser())
|
||||||
// +-----------------------------------------------------------------------+
|
// +-----------------------------------------------------------------------+
|
||||||
if (isset($_POST['submit']) 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'));
|
array_push($page['errors'], l10n('locfiledit_webmaster_only'));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue