-
Notifications
You must be signed in to change notification settings - Fork 0
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 missing authorizations
app for commonground-api-common
#70
Conversation
@@ -211,6 +211,7 @@ | |||
"csp", | |||
"corsheaders", | |||
"vng_api_common", | |||
"vng_api_common.authorizations", |
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.
@SonnyBA come to think of it, I'm actually not sure if all components use this (e.g. Objects/Objecttypes), so wouldn't it be better to add this only to the components that need it? 🤔
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.
Open-zaak (commonground-api-common
used the middleware class from this project), Open-Klant and Open-Notificaties use the authorizations
app from commonground-api-common
.
I think the migrations authorizations
migrations currently are recognized (even if the app is not installed) because the middleware.py
imports them. It should be easily fixed though whenever we move the authorization related middleware to the authorizations
app. This probably requires a new release though of OAF (because all projects pull in commonground-api-common
through OAF) and commonground-api-common
.
The current suggested fix is probably a bit less work but is also the uglier solution. @Coperh @stevenbal which option would you prefer?
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 think it would be best to indeed move the middleware to the authorizations app. I think this also relates to #67, we should make these dependencies should be optional at some point probably
This fixes applications not including the `vng_api_common.authorizations` app to create duplicate migrations. See maykinmedia/open-api-framework#70 (comment)
closing this, because we instead opted to move the middleware in commonground-api-common: maykinmedia/commonground-api-common#36 |
Fixes
makemigrations
creating a new migration for several authorization models.Changes
The migrations that are currently generated when running
makemigrations
inopen-klant
generates a migration with models for theauthorizations
app because the migrations in the existing app are not recognized (as the app is not in theINSTALLED_APPS
)See https://github.com/maykinmedia/commonground-api-common/blob/1.12.1/docs/quickstart.rst?plain=1#L43.
Also see the
check_migrations
CI job that encountered this issue.