Refactor Kesäseteli to use configurable admin (site) group name#3849
Refactor Kesäseteli to use configurable admin (site) group name#3849nikomakela merged 2 commits intomainfrom
Conversation
|
YJDH-KESASETELI-API branch is deployed to platta: https://yjdh-kesaseteli-pr3849.api.dev.hel.ninja 🚀🚀🚀 |
26b2b7b to
3eb7f1b
Compare
|
YJDH-KESASETELI-API branch is deployed to platta: https://yjdh-kesaseteli-pr3849.api.dev.hel.ninja 🚀🚀🚀 |
|
YOUTH branch is deployed to platta: https://nuortenkesaseteli-pr3849.dev.hel.ninja 🚀🚀🚀 |
TestCafe youth result is failed for https://nuortenkesaseteli-pr3849.dev.hel.ninja 😿💢💥💥 |
| # Ensure we use a valid group name | ||
| if not settings.AD_ADMIN_GROUP_NAME: | ||
| settings.AD_ADMIN_GROUP_NAME = "kesaseteli-admin" |
There was a problem hiding this comment.
How about something like this for added robustness?
| # Ensure we use a valid group name | |
| if not settings.AD_ADMIN_GROUP_NAME: | |
| settings.AD_ADMIN_GROUP_NAME = "kesaseteli-admin" | |
| settings.AD_ADMIN_GROUP_NAME = "kesaseteli-admin" | |
| Group.objects.filter(name=settings.AD_ADMIN_GROUP_NAME).delete() |
| if not settings.AD_ADMIN_GROUP_NAME: | ||
| settings.AD_ADMIN_GROUP_NAME = "kesaseteli-admin" |
There was a problem hiding this comment.
No need for the if:
| if not settings.AD_ADMIN_GROUP_NAME: | |
| settings.AD_ADMIN_GROUP_NAME = "kesaseteli-admin" | |
| settings.AD_ADMIN_GROUP_NAME = "kesaseteli-admin" |
karisal-anders
left a comment
There was a problem hiding this comment.
Left some comments, please take a look at them. Please would you rebase on main to get rid of the ruff formatting change reversals (Aren't those the ones that already got changed in another PR just now).
Those are now included in this PR, since that PR was based on this one. I accidentally published them in 2 different PR. |
YJDH-733. Fixed code style and formatting: 1. Ran `ruff check --fix .` and manually fixed what was left. 2. Ran `ruff format .`
3eb7f1b to
4b015a5
Compare
|
YJDH-KESASETELI-API branch is deployed to platta: https://yjdh-kesaseteli-pr3849.api.dev.hel.ninja 🚀🚀🚀 |
|
|
EMPLOYER branch is deployed to platta: https://kesaseteli-pr3849.dev.hel.ninja 🚀🚀🚀 |
|
YOUTH branch is deployed to platta: https://nuortenkesaseteli-pr3849.dev.hel.ninja 🚀🚀🚀 |
|
HANDLER branch is deployed to platta: https://kesaseteli-handler-ui-pr3849.dev.hel.ninja 🚀🚀🚀 |
TestCafe result is success for https://kesaseteli-handler-ui-pr3849.dev.hel.ninja 😆🎉🎉🎉 |
TestCafe result is success for https://nuortenkesaseteli-pr3849.dev.hel.ninja 😆🎉🎉🎉 |
TestCafe result is success for https://kesaseteli-pr3849.dev.hel.ninja 😆🎉🎉🎉 |



YJDH-733.
Refactor
staff_Admin_permissions(sub) app so that the admin group name can be configured and left as None (to disable the feature).Management command
python manage.py setup_admin_permissionsreads the admin group from settings to setup admin permissions for that group.