- allow supermaintainers AND maintainers to edit app version
- remove redundant permission check when editting notes
This commit is contained in:
@@ -18,7 +18,7 @@ if(!is_numeric($_REQUEST['noteId']))
|
|||||||
$oNote = new Note($_REQUEST['noteId']);
|
$oNote = new Note($_REQUEST['noteId']);
|
||||||
|
|
||||||
/* Check for privs */
|
/* Check for privs */
|
||||||
if(!$_SESSION['current']->isLoggedIn() || (!$_SESSION['current']->hasPriv("admin") && !$_SESSION['current']->isMaintainer($oNote->iVersionId) && !isSuperMaintainer($oNote->iAppId)) )
|
if(!$_SESSION['current']->hasPriv("admin") && !$_SESSION['current']->isMaintainer($oNote->iVersionId) && !isSuperMaintainer($oNote->iAppId))
|
||||||
{
|
{
|
||||||
errorpage("Insufficient Privileges!");
|
errorpage("Insufficient Privileges!");
|
||||||
exit;
|
exit;
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ if(!is_numeric($_REQUEST['appId']) OR !is_numeric($_REQUEST['versionId']))
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Check for admin privs */
|
/* Check for admin privs */
|
||||||
if(!($_SESSION['current']->hasPriv("admin") || $_SESSION['current']->isMaintainer($_REQUEST['appId'],$_REQUEST['versionId'])))
|
if(!$_SESSION['current']->hasPriv("admin") && !$_SESSION['current']->isMaintainer($_REQUEST['versionId']) && !isSuperMaintainer($_REQUEST['appId']))
|
||||||
{
|
{
|
||||||
errorpage("Insufficient Privileges!");
|
errorpage("Insufficient Privileges!");
|
||||||
exit;
|
exit;
|
||||||
|
|||||||
Reference in New Issue
Block a user