This repository has been archived by the owner on Apr 25, 2023. It is now read-only.
Add limit in how many configurations each user may have. #47
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
If the option max-number-client-config is more than 0 this number is the
maximum number of clients a user can create.
The setting only limits creation. If a user had created more
configurations before this setting is enforced or lowered the user may
user the service as before, just cant create any more configurations.
This partitionaly fixes #46 . I have tested the function that it works, but it does not notifies the user what the source of the problem is. I'm not familiar with node or svelte, but I have looked at:
https://github.com/keenethics/svelte-notifications
and that might be used as notification framework.
But I think this must be a discussion with the maintainers of their long time goal for the project.
Also the http status code I choose as an response might be discussed: 429.
Added 2020-03-19: This PR now includes an alert() when the user tried to create more than the limit.
Added 2020-03-20: Use http status 400 instead of 429 as discussed.