Remove isMaintainer() and isSuperMaintainer and instead use the user
classes is_maintainer() and is_super_maintainer.
This commit is contained in:
@@ -10,7 +10,7 @@ require(BASE."include/"."application.php");
|
||||
global $apidb_root;
|
||||
|
||||
//check for admin privs
|
||||
if(!loggedin() || (!havepriv("admin") && !isMaintainer($appId,$versionId)) )
|
||||
if(!loggedin() || (!havepriv("admin") && !$_SESSION['current']->is_maintainer($appId,$versionId)) )
|
||||
{
|
||||
errorpage("Insufficient Privileges!");
|
||||
exit;
|
||||
|
||||
@@ -61,7 +61,10 @@ if (!$_REQUEST['queueId'])
|
||||
$c = 1;
|
||||
while($ob = mysql_fetch_object($result))
|
||||
{
|
||||
if(isMaintainer($ob->queueappId,$ob->queueversionId) || havepriv("admin")) {
|
||||
if($_SESSION['current']->is_maintainer($ob->queueappId,
|
||||
$ob->queueversionId)
|
||||
|| havepriv("admin"))
|
||||
{
|
||||
if ($c % 2 == 1) { $bgcolor = 'color0'; } else { $bgcolor = 'color1'; }
|
||||
echo "<tr class=$bgcolor>\n";
|
||||
echo " <td>".date("Y-n-t h:i:sa", $ob->submitTime)." </td>\n";
|
||||
@@ -83,7 +86,10 @@ if (!$_REQUEST['queueId'])
|
||||
|
||||
} else // shows a particular appdata
|
||||
{
|
||||
if(!(havepriv("admin") || isMaintainer($obj_row->queueAppId,$obj_row->queueVersionId))) {
|
||||
if(!(havepriv("admin") ||
|
||||
$_SESSION['current']->is_maintainer($obj_row->queueAppId,
|
||||
$obj_row->queueVersionId)))
|
||||
{
|
||||
errorpage("You don't have sufficient priviledges to use this page.");
|
||||
exit;
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ global $apidb_root;
|
||||
|
||||
|
||||
//check for admin privs
|
||||
if(!loggedin() || (!havepriv("admin") && !isMaintainer($appId,$versionId)) )
|
||||
if(!loggedin() || (!havepriv("admin") && !$_SESSION['current']->is_maintainer($appId,$versionId)) )
|
||||
{
|
||||
errorpage("Insufficient Privileges!");
|
||||
exit;
|
||||
|
||||
@@ -9,7 +9,7 @@ require(BASE."include/"."application.php");
|
||||
|
||||
|
||||
//check for admin privs
|
||||
if(!loggedin() || (!havepriv("admin") && !isMaintainer($_REQUEST['appId'], $_REQUEST['versionId'])) )
|
||||
if(!loggedin() || (!havepriv("admin") && !$_SESSION['current']->is_maintainer($_REQUEST['appId'], $_REQUEST['versionId'])) )
|
||||
{
|
||||
errorpage("Insufficient Privileges!");
|
||||
exit;
|
||||
|
||||
Reference in New Issue
Block a user