Allow supermaintainers to edit notes

This commit is contained in:
Jonathan Ernst
2005-02-19 01:23:02 +00:00
committed by WineHQ
parent 412d4756fe
commit b103c6651d
2 changed files with 7 additions and 3 deletions

View File

@@ -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;

View File

@@ -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 .= "</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}\">";