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,19 +1159,25 @@ class Version {
|
||||
|
||||
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)
|
||||
$sIncludeUserSubmissions = "OR appVersion.submitterId = '".
|
||||
$_SESSION['current']->iUserId."'";
|
||||
|
||||
$sQuery = "SELECT COUNT(DISTINCT appVersion.versionId) as count FROM
|
||||
appVersion, appFamily WHERE
|
||||
appFamily.appId = appVersion.appId
|
||||
AND
|
||||
appFamily.queued = 'false'
|
||||
AND
|
||||
appVersion.submitterId = '?'
|
||||
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
|
||||
@@ -1189,11 +1195,9 @@ class Version {
|
||||
appMaintainers.userId = '?'
|
||||
AND
|
||||
appMaintainers.queued = 'false'
|
||||
)
|
||||
$sIncludeUserSubmissions
|
||||
)
|
||||
AND
|
||||
appVersion.queued = '?'";
|
||||
|
||||
$hResult = query_parameters($sQuery, $_SESSION['current']->iUserId, $sQueued);
|
||||
} else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user