user->isMaintainer() should return true if the user is a super maintainer of the application

This commit is contained in:
Chris Morgan
2005-07-30 16:35:03 +00:00
committed by WineHQ
parent f14d6a20ab
commit 4be7e90e66

View File

@@ -201,6 +201,13 @@ class User {
function isMaintainer($iVersionId=null)
{
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)
{
$sQuery = "SELECT * FROM appMaintainers WHERE userid = '".$this->iUserId."' AND versionId = '$iVersionId'";