Chris Morgan

Only display testing results for applications that are not currently queued if the user isn't an admin.
This commit is contained in:
WineHQ
2006-01-14 03:30:35 +00:00
parent 2be058a66d
commit 8f65897592
2 changed files with 27 additions and 3 deletions

View File

@@ -44,9 +44,25 @@ class distribution{
/*
* We fetch Test Result Ids.
*/
$sQuery = "SELECT testingId
FROM testResults
WHERE distributionId = ".$iDistributionId;
if($_SESSION['current']->hasPriv("admin"))
{
$sQuery = "SELECT testingId
FROM testResults
WHERE distributionId = ".$iDistributionId;
} else /* only let users view test results that aren't queued and for apps that */
/* aren't queued or versions that aren't queued */
{
$sQuery = "SELECT testingId
FROM testResults, appFamily, appVersion
WHERE testResults.queued = 'false' AND
testResults.versionId = appVersion.versionId AND
appFamily.appId = appVersion.appId AND
appFamily.queued = 'false' AND
appVersion.queued = 'false' AND
distributionId = ".$iDistributionId;
}
if($hResult = query_appdb($sQuery))
{
while($oRow = mysql_fetch_object($hResult))