-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add deny list and validator for organization code #800
Conversation
Minimum allowed coverage is Generated by 🐒 cobertura-action against 1178a8c |
rocky/rocky/settings.py
Outdated
"octopoes", | ||
"rocky", | ||
"fmea", | ||
] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure this should be a setting. Making this a setting implies that a user can change it, but a user should not removes codes from this list because things will be broken if such codes are used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Being able to add extra denied names is a nice feature though, as we might run into situation where people install other apps, or just don' want some words to be used in their install.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is also possible is to have 2 lists, one for internal usage and an extra extended one for reserved codes. Let me know what can be decided here @underdarknl @dekkers
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see how we can run into a situation where people install other apps and even if they do that they have to modify the code anyway. Adding organisations is also not something that can be done by everyone. I don't think we should turn this simple PR that denies the names that conflict with urls into something more complex feature that supports users being able to configure denying certain words in organisation names. I think we have more important things to work on...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed, let keep it a non-user-configurable setting.
this closes #510 |
Looks good, moving to QA. |
Checklist for QA:
What works:
Can be merged if @Donnype agrees. |
Co-authored-by: Donny Peeters <[email protected]> Co-authored-by: Patrick <[email protected]>
Changes
We must exclude some organization codes that cannot be used when creating a new organization. Some organization codes like
admin
conflicts with the Django admin. We might extend the deny list when more confliction occurs or things we really want to deny.Issue link
Closes #510
Proof
From admin:
From the api:
Checklists for authors:
Code Checklist
Communication
.env
changes files if required and changed the.env-dist
accordingly.Checklist for code reviewers:
Checklist for QA:
make kat
.feature
orhotfix
works as intended.What works:
What doesn't work:
Bug or feature?: