Allow supermaintainers to edit notes
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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,6 +73,7 @@ function display_bundle($appId)
|
||||
|
||||
/* Show note */
|
||||
function show_note($sType,$oData){
|
||||
global $oVersion;
|
||||
|
||||
switch($sType)
|
||||
{
|
||||
@@ -101,7 +105,7 @@ function show_note($sType,$oData){
|
||||
$s .= $oData->noteDesc;
|
||||
$s .= "</td></tr>\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 .= "<tr class=\"color1\" align=\"center\" valign=\"top\"><td>";
|
||||
$s .= "<form method=\"post\" name=\"message\" action=\"admin/editAppNote.php?noteId={$oData->noteId}\">";
|
||||
|
||||
Reference in New Issue
Block a user