RealDevSquad / RealDevSquad/website-backend
suggestion to change in authorizeUser middleware flow
Open
@pallabez is already working on this.
Since Apr 23, 2022.
bug
- Dominant language
- JavaScript
- Stars
- 74
- Forks
- 276
- Avg merge
- 1d 26m
- Merged PRs (30d)
- 14
Description
authorizeUser middleware is currently used for setting up the role needed to consume that API.
eg - authorizeUser("appOwner") sets it up so that only appOwner or above(superUser) can access the API.
But if we accidentally pass the wrong argument, let's say authorizeUser("app_owner"), it uses the current default state of authorizeUser. i e. anyone can use this API. Which can be harmful.
I'd suggest to change the default state of authorizeUser to be restricted so that no roles can use this API and we catch it early on.
Estimated time to complete - 30 min
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.