user->isMaintainer() should return true if the user is a super maintainer of the application
This commit is contained in:
@@ -201,6 +201,13 @@ class User {
|
|||||||
function isMaintainer($iVersionId=null)
|
function isMaintainer($iVersionId=null)
|
||||||
{
|
{
|
||||||
if(!$this->isLoggedIn()) return false;
|
if(!$this->isLoggedIn()) return false;
|
||||||
|
|
||||||
|
/* if we are a super maintainer, we are a maintainer of this version as well */
|
||||||
|
$oVersion = new Version($iVersionId);
|
||||||
|
if($this->isSuperMaintainer($oVersion->iAppId))
|
||||||
|
return true;
|
||||||
|
|
||||||
|
/* otherwise check if we maintain this specific version */
|
||||||
if($iVersionId)
|
if($iVersionId)
|
||||||
{
|
{
|
||||||
$sQuery = "SELECT * FROM appMaintainers WHERE userid = '".$this->iUserId."' AND versionId = '$iVersionId'";
|
$sQuery = "SELECT * FROM appMaintainers WHERE userid = '".$this->iUserId."' AND versionId = '$iVersionId'";
|
||||||
|
|||||||
Reference in New Issue
Block a user