-
Notifications
You must be signed in to change notification settings - Fork 89
Improve challenge visibility control: getChallenge and getRegistrants #504
Conversation
(https://www.topcoder.com/challenge-details/30057891/?type=develop) Verification guide: docs/Verification_Guide-Improve Challenge Visibility Control.doc
The eligibility check routine is now in challengeHelper and can be added anywhere by a couple of simple lines of code.
@TheOsch thanks, looks good, after fixing this, what endpoints are left for challenges? |
I saw you have changed a number of queries by adding a group id check there. I think now first it would be good to update all places where these queries are used and remove toese checks, wouldn't it? I think I can make it in a day. |
It may appear that this operation will empty our list of endpoints to change leaving only those that were included there by mistake. |
* 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
By the way, is there an endpoint in V3 that returns a list of groups the given user belongs to? It would be very useful. |
Yes, you can do this: https://api.topcoder-dev.com/v3/groups?memberId=######&membershipType=user |
@ajefts I couldn't get a valid auth token to call the service. Can you please show me a sample output of this call? |
Sure.
|
@ajefts Thank you |
* 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
@skyhit |
@TheOsch ok, that is fine. |
Made a PR on Friday bit forgot to notify you. Did you notice it? |
Yes |
@TheOsch ok, I will review that |
I had to tell you 3 days ago but I thought you'll be automatically notified about it. Sorry. |
@TheOsch some of the changes seems already applied, can you merge latest dev? so I can see the difference clearly? |
The latest commit to dev was earlier than the PR, and I merged just before pushing. Right now the attempt to merge results in 'Already up-to-date.' message, and status reports there's nothing to commit. |
Which changes are suspicious? |
Improve challenge visibility control: getChallenge and getRegistrants
I removed one field from the
check_is_related_with_challenge
query. BesidesgetChallenge
there are two other functions inactions/challenges.js
that use this query:getSubmissions
andgetPhases
. These two functions use this query only to check the eligibility. I decided to take the liberty of fixing them too. So now six more actions work according to the new logic: getChallenge, getSoftwareChallenge, getStudioChallenge (all these three actions in fact consist of a simple call to the same function - getChallenge), getRegistrants, getSubmissions and getRoles.Postman tests are provided for getChallenge, getRegistrants, getSubmissions and getRoles actions.