Simplify and fix User::hasAppVersionModifyPermission()
This commit is contained in:
@@ -866,16 +866,15 @@ class User {
|
|||||||
if($this->hasPriv("admin"))
|
if($this->hasPriv("admin"))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
$sQuery = "SELECT appVersion.versionId FROM appVersion, appFamily, appMaintainers
|
if($this->isSuperMaintainer($oVersion->iAppId))
|
||||||
WHERE appFamily.appId = appVersion.appId
|
|
||||||
AND appFamily.appId = appMaintainers.appId
|
|
||||||
AND appMaintainers.superMaintainer = '1'
|
|
||||||
AND appMaintainers.userId = '".$this->iUserId."'
|
|
||||||
AND appVersion.versionId = '".$oVersion->iVersionId."';";
|
|
||||||
$hResult = query_appdb($sQuery);
|
|
||||||
if(mysql_num_rows($hResult))
|
|
||||||
return true;
|
return true;
|
||||||
else
|
|
||||||
|
if($this->isMaintainer($oVersion->iVersionId))
|
||||||
|
return true;
|
||||||
|
|
||||||
|
if(($oVersion->sQueued != 'false') && ($this->iUserId == $oVersion->iSubmitterId))
|
||||||
|
return true;
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user