make version::objectGetEntriesCount() more consistent for rejected versions by not allowing
maintainers to see rejected versions for applications they maintain
This commit is contained in:
committed by
WineHQ
parent
6c55180786
commit
ec0cb3dbbb
@@ -1159,41 +1159,45 @@ class Version {
|
|||||||
|
|
||||||
if($bQueued && !version::canEdit())
|
if($bQueued && !version::canEdit())
|
||||||
{
|
{
|
||||||
/* Users should see their own rejected entries */
|
/* Users should see their own rejected entries, but maintainers should
|
||||||
|
not be able to see rejected entries for versions they maintain */
|
||||||
if($bRejected)
|
if($bRejected)
|
||||||
$sIncludeUserSubmissions = "OR appVersion.submitterId = '".
|
$sQuery = "SELECT COUNT(DISTINCT appVersion.versionId) as count FROM
|
||||||
$_SESSION['current']->iUserId."'";
|
appVersion, appFamily WHERE
|
||||||
|
appFamily.appId = appVersion.appId
|
||||||
$sQuery = "SELECT COUNT(DISTINCT appVersion.versionId) as count FROM
|
AND
|
||||||
appVersion, appMaintainers, appFamily WHERE
|
appFamily.queued = 'false'
|
||||||
appFamily.appId = appVersion.appId
|
AND
|
||||||
AND
|
appVersion.submitterId = '?'
|
||||||
appFamily.queued = 'false'
|
AND
|
||||||
AND
|
appVersion.queued = '?'";
|
||||||
(
|
else
|
||||||
|
$sQuery = "SELECT COUNT(DISTINCT appVersion.versionId) as count FROM
|
||||||
|
appVersion, appMaintainers, appFamily WHERE
|
||||||
|
appFamily.appId = appVersion.appId
|
||||||
|
AND
|
||||||
|
appFamily.queued = 'false'
|
||||||
|
AND
|
||||||
(
|
(
|
||||||
(
|
(
|
||||||
(
|
appMaintainers.appId = appVersion.appId
|
||||||
appMaintainers.appId = appVersion.appId
|
AND
|
||||||
AND
|
superMaintainer = '1'
|
||||||
superMaintainer = '1'
|
)
|
||||||
)
|
OR
|
||||||
OR
|
(
|
||||||
(
|
appMaintainers.versionId = appVersion.versionId
|
||||||
appMaintainers.versionId = appVersion.versionId
|
AND
|
||||||
AND
|
superMaintainer = '0'
|
||||||
superMaintainer = '0'
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
AND
|
|
||||||
appMaintainers.userId = '?'
|
|
||||||
AND
|
|
||||||
appMaintainers.queued = 'false'
|
|
||||||
)
|
)
|
||||||
$sIncludeUserSubmissions
|
AND
|
||||||
)
|
appMaintainers.userId = '?'
|
||||||
AND
|
AND
|
||||||
appVersion.queued = '?'";
|
appMaintainers.queued = 'false'
|
||||||
|
AND
|
||||||
|
appVersion.queued = '?'";
|
||||||
|
|
||||||
$hResult = query_parameters($sQuery, $_SESSION['current']->iUserId, $sQueued);
|
$hResult = query_parameters($sQuery, $_SESSION['current']->iUserId, $sQueued);
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user