Skip to content

Owner doesn't have permissions to load challenge if task is assigned to someone #272

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
maxceem opened this issue Aug 18, 2020 · 1 comment

Comments

@maxceem
Copy link

maxceem commented Aug 18, 2020

Steps to reproduce

  1. Create a challenge with any non-admin user, for example, with a Topcoder Manager pshah_manager
  2. Call GET endpoint for the created challenge using Postman to make sure that pshah_manager user can see the challenge.
  3. Use Postman to PATCH the challenge and assign task member with the next body:
    {
      "task": {
         "isTask": true,
         "memberId": "40035291",
         "isAssigned": true
       }
    }
  4. Now call GET endpoint again, the access would be denied:
     {
        "message": "You don't have access to view this challenge"
     }
    

The reason for this issue is this security check https://github.com/topcoder-platform/challenge-api/blob/develop/src/services/ChallengeService.js#L924-L929.
We should additionally allow to get tasks to the copilots.

@rootelement
Copy link
Contributor

Fixed in #287

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants