comment: Fix delete permissions
This commit is contained in:
committed by
Chris Morgan
parent
0f21daba18
commit
09d96b79bd
@@ -234,10 +234,9 @@ class Comment {
|
|||||||
|
|
||||||
echo "</td></tr>\n";
|
echo "</td></tr>\n";
|
||||||
|
|
||||||
|
$oComment = new comment($oRow->commentId);
|
||||||
// delete message button, for admins
|
// delete message button, for admins
|
||||||
if ($_SESSION['current']->hasPriv("admin")
|
if ($oComment->canEdit())
|
||||||
|| $_SESSION['current']->isMaintainer($oRow->versionId)
|
|
||||||
|| $_SESSION['current']->isSuperMaintainer($oRow->appId))
|
|
||||||
{
|
{
|
||||||
$oVersion = new version($oRow->versionId);
|
$oVersion = new version($oRow->versionId);
|
||||||
echo "<tr>";
|
echo "<tr>";
|
||||||
@@ -353,7 +352,11 @@ class Comment {
|
|||||||
|
|
||||||
function canEdit()
|
function canEdit()
|
||||||
{
|
{
|
||||||
return $_SESSION['current']->hasPriv("admin");
|
if($_SESSION['current']->hasPriv("admin"))
|
||||||
|
return TRUE;
|
||||||
|
|
||||||
|
$oVersion = new version($this->iVersionId);
|
||||||
|
return $oVersion->canEdit();
|
||||||
}
|
}
|
||||||
|
|
||||||
function objectGetId()
|
function objectGetId()
|
||||||
|
|||||||
Reference in New Issue
Block a user