Skip to content

User can register to a challenge before "Registration" phase begin #6784

@nursoltan-s

Description

@nursoltan-s

Describe the bug
When Topcoder releases challenge and it is not yet started, but visible on "All challenges" tab. Registration button is disabled on UI. However, user can still register to this challenge via API and access to forum and private description etc. I think this will not be fair for others who don't know this method and needs to be fixed.

To Reproduce
Steps to reproduce the behavior:
0. Login to your account.

  1. Go to https://qa-community-app.topcoder-dev.com/challenges/6b06a3c6-15d2-410d-8a50-d76ceea8aea3 or any stalled challenge
  2. Copy your bearer token. (Open developer tool and go to network tab. You can see your bearer token there.)
  3. Send below request via curl:
curl --location --request POST 'api.topcoder.com/v5/resources' \
--header 'Authorization: Bearer.<Insert Token here>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "challengeId": "<INSERT CHALLENGE ID>",
    "memberHandle": "<YOUR HANDLE>",
    "roleId": "732339e7-8e30-49d7-9198-cccf9451e221"
}'
  1. See user can register to a challenge without problem.

Expected behavior
API should return error when challenge's registration phase is not started.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions