mevdschee / mevdschee/php-crud-api
/register endpoint, permissions
@mevdschee is already working on this.
Since Nov 28, 2020.
- Dominant language
- PHP
- Stars
- 3.7k
- Forks
- 1k
- Avg merge
- 1h 55m
- Merged PRs (30d)
- 7
Description
Hi Maurits,
Once again, great job on a welcomed feature (/register endpoint and dbAuth.registerUser middleware config)!
Do you think if it would be feasible to add a config (or use the same dbAuth.registerUser config) that would allow us to specify what operations should be allowed on this endpoint (e.g.: allow-overwrite / unique, something like that) - maybe, failing if we try something that is not allowed, etc. ?
Scenario: I have a predefined user (let's call it "super-admin"). This super-admin user, after being logged in, will try to register a new user via the /register endpoint.
Now, the api allows us to repeat this operation, basically adding the same user to the db multiple times. Could we stop this behaviour via a config option? This is just for discussion, and, maybe, future enhancement of this (really great) endpoint.
Cheers! Keep the good work comin'!
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.