Is your feature request related to a problem or unsupported use case? Please describe.
The https://github.com/numerique-gouv/people/pull/469/ PR introduces a temporary feature to link already existing user without an Organization to an Organization at authentication stage.
This Issue is a kind reminder to cleanup the code when all existing user have an Organization.
Describe the solution you'd like
The OIDCAuthenticationBackend.get_or_create_user method should not try to update the organization for User without any. We should remove this code when all user in database have an Organization.
We should also make the Organization field mandatory on the User model and the Team model.
Discovery, Documentation, Adoption, Migration Strategy
Once all User/Team have an organization, we can safely make the cleanup.
Do you want to work on it through a Pull Request?
I will do it when data in staging/production is ready for this.
Code cleanup
Is your feature request related to a problem or unsupported use case? Please describe. The https://github.com/numerique-gouv/people/pull/469/ PR introduces a temporary feature to link already existing user without an Organization to an Organization at authentication stage. This Issue is a kind reminder to cleanup the code when all existing user have an Organization.
Describe the solution you'd like The
OIDCAuthenticationBackend.get_or_create_user
method should not try to update the organization for User without any. We should remove this code when all user in database have an Organization. We should also make the Organization field mandatory on the User model and the Team model.Discovery, Documentation, Adoption, Migration Strategy Once all User/Team have an organization, we can safely make the cleanup.
Do you want to work on it through a Pull Request? I will do it when data in staging/production is ready for this.