Closed jmgasper closed 1 year ago
@jmgasper Just checking that this will do the appropriate validation to make sure that the user should be allowed to be deleted? For example, if they already have submitted then we shouldn't delete them? If they have submitted/saved a review, has a payment associated to them, is the creator of the challenge, etc?
@ajefts - I'll make sure we document this for QA, thanks. I'll double check that we have secondary validation in the resources API as well.
@ajefts - The resources API does no validation of any business logic when deleting a resource from a challenge, just FYI, so we'll enforce it in WM to be the same as OR.
Thanks. We should probably get the API updated as well though so that other apps/integrations won't need to recreate the business logic and/or end up creating orphaned/corrupted data?
Yeah, agreed. I'll add that to the list. Not sure on timing with my limited budget.
Expected behavior
On the
Resources
tab for a challenge, we will add a new column to all tables that has a delete button (this can just be the trash can icon).When the user clicks the button, they will get a popup that says:
Are you sure you want to remove {handle} from this challenge?
Yes
will remove the memberNo
will close the popupDeleting a resource
A resource can be deleted by DELETE to https://api.topcoder-dev.com/v5/resources
Sample body:
Security
The delete button and functionality should only be allowed for: