diff --git a/admin/editAppNote.php b/admin/editAppNote.php index 590e746..2f156a4 100644 --- a/admin/editAppNote.php +++ b/admin/editAppNote.php @@ -18,7 +18,7 @@ if(!is_numeric($_REQUEST['noteId'])) $oNote = new Note($_REQUEST['noteId']); /* Check for privs */ -if(!$_SESSION['current']->hasPriv("admin") && !$_SESSION['current']->isMaintainer($oNote->iVersionId) && !isSuperMaintainer($oNote->iAppId)) +if(!$_SESSION['current']->hasPriv("admin") && !$_SESSION['current']->isMaintainer($oNote->iVersionId) && !$_SESSION['current']->isSuperMaintainer($oNote->iAppId)) { errorpage("Insufficient Privileges!"); exit; diff --git a/appview.php b/appview.php index 0c4715c..6159dc8 100644 --- a/appview.php +++ b/appview.php @@ -15,6 +15,9 @@ require(BASE."include/category.php"); require(BASE."include/maintainer.php"); +$oApp = new Application($_REQUEST['appId']); +$oVersion = new Version($_REQUEST['versionId']); + /** * display the full path of the Category we are looking at */ @@ -70,7 +73,8 @@ function display_bundle($appId) /* Show note */ function show_note($sType,$oData){ - + global $oVersion; + switch($sType) { case 'WARNING': @@ -101,7 +105,7 @@ function show_note($sType,$oData){ $s .= $oData->noteDesc; $s .= "\n"; - if ($_SESSION['current']->hasPriv("admin") || $_SESSION['current']->isMaintainer($_REQUEST['versionId'])) + if ($_SESSION['current']->hasPriv("admin") || $_SESSION['current']->isMaintainer($oVersion->iVersionId) || $_SESSION['current']->isSuperMaintainer($oVersion->iAppId)) { $s .= "