This repository has been archived by the owner on Jan 23, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
More eligibility and group updates (#506)
* Improve challenge visibility control (#501) * IMPROVE CHALLENGE VISIBILITY CONTROL (https://www.topcoder.com/challenge-details/30057891/?type=develop) Verification guide: docs/Verification_Guide-Improve Challenge Visibility Control.doc * Restoring an accidentially modified file * Fixed the case with a challenge that doesn't have eligibility * Shared the eligibility verification with challengeRegistration. The eligibility check routine is now in challengeHelper and can be added anywhere by a couple of simple lines of code. * improve the query * update query for groups (#502) * Update queries (#503) improve logging for v3 api call * should use externalToken field name * update queries for group checking * Improve challenge visibility control: getChallenge and getRegistrants (#504) * IMPROVE CHALLENGE VISIBILITY CONTROL (https://www.topcoder.com/challenge-details/30057891/?type=develop) Verification guide: docs/Verification_Guide-Improve Challenge Visibility Control.doc * Restoring an accidentially modified file * Fixed the case with a challenge that doesn't have eligibility * Shared the eligibility verification with challengeRegistration. The eligibility check routine is now in challengeHelper and can be added anywhere by a couple of simple lines of code. * Improve challenge visibility control: getChallenge and getRegistrants * revert commit
- Loading branch information
Showing
7 changed files
with
708 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+4 KB
(110%)
docs/Verification_Guide-Improve Challenge Visibility Control.doc
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,22 @@ | ||
SELECT | ||
(SELECT | ||
1 | ||
max(1) | ||
FROM contest_eligibility ce | ||
INNER JOIN group_contest_eligibility gce ON gce.contest_eligibility_id = ce.contest_eligibility_id | ||
INNER JOIN user_group_xref ugx ON ugx.group_id = gce.group_id | ||
WHERE ce.contest_id = @challengeId@ | ||
AND ((ugx.login_id = @user_id@ AND gce.group_id < 2000000) OR gce.group_id >= 2000000)) AS has_access | ||
) AS is_private | ||
, (SELECT | ||
1 | ||
FROM contest_eligibility ce | ||
WHERE ce.contest_id = @challengeId@) AS is_private | ||
, ( | ||
SELECT | ||
decode(max(ri.value), null, null, 1) | ||
FROM resource r | ||
INNER JOIN resource_info ri ON ri.resource_id = r.resource_id AND ri.resource_info_type_id = 1 | ||
INNER JOIN resource_info ri ON ri.resource_id = r.resource_id AND ri.resource_info_type_id = 1 | ||
WHERE r.project_id = @challengeId@ | ||
AND ri.value = @user_id@) AS is_related | ||
, (SELECT max(project_metadata_id) FROM direct_project_metadata m, project p | ||
WHERE metadata_value = @user_id@ AND p.tc_direct_project_id = m.tc_direct_project_id and p.project_id = @challengeId@ AND project_metadata_key_id IN (1, 2, 14)) AS is_manager | ||
AND ri.value = @user_id@ | ||
) AS is_related | ||
, (SELECT | ||
max(project_metadata_id) | ||
FROM direct_project_metadata m, project p | ||
WHERE metadata_value = @user_id@ | ||
AND p.tc_direct_project_id = m.tc_direct_project_id | ||
AND p.project_id = @challengeId@ | ||
AND project_metadata_key_id IN (1, 2, 14) | ||
) AS is_manager | ||
FROM dual |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.