Auto-accept a maintainer request if the user has sufficient privileges.
This commit is contained in:
committed by
WineHQ
parent
3a6034a60d
commit
cc7f3d3bc3
@@ -49,7 +49,7 @@ class maintainer
|
|||||||
"VALUES ('?', '?', '?', '?', '?', ?, '?')",
|
"VALUES ('?', '?', '?', '?', '?', ?, '?')",
|
||||||
$this->iAppId, $this->iVersionId,
|
$this->iAppId, $this->iVersionId,
|
||||||
$this->iUserId, $this->sMaintainReason,
|
$this->iUserId, $this->sMaintainReason,
|
||||||
$this->bSuperMaintainer, "NOW()", 'true');
|
$this->bSuperMaintainer, "NOW()", $this->mustBeQueued() ? "true" : "false");
|
||||||
|
|
||||||
/* this objects id is the insert id returned by mysql */
|
/* this objects id is the insert id returned by mysql */
|
||||||
$this->iMaintainerId = mysql_insert_id();
|
$this->iMaintainerId = mysql_insert_id();
|
||||||
@@ -128,6 +128,15 @@ class maintainer
|
|||||||
return $hResult;
|
return $hResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function mustBeQueued()
|
||||||
|
{
|
||||||
|
/* In place for future fine-grained permisson system, only allow admins for now */
|
||||||
|
if($_SESSION['current']->hasPriv("admin"))
|
||||||
|
return FALSE;
|
||||||
|
else
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
function delete()
|
function delete()
|
||||||
{
|
{
|
||||||
$sQuery = "DELETE from appMaintainers where maintainerId = '?'";
|
$sQuery = "DELETE from appMaintainers where maintainerId = '?'";
|
||||||
|
|||||||
Reference in New Issue
Block a user