-
Notifications
You must be signed in to change notification settings - Fork 84
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
Migrate user permissions from previous release #916
Conversation
0dcf93c
to
f01ed94
Compare
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.
The code is ok but the problem that I see is the first time the user migrates. It won't be any user an any group.
If they are included in a tenant, they will have |
Is that true? I mean, they have those permissions but there's no entry in the database saying that they have those permissions. The table |
f01ed94
to
f897143
Compare
I think you mean that I forgot to migrate the permissions when multitenancy is disabled. I have updated that. Additionally, I changed the default permissions to |
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.
LGTM
f897143
to
ad6c7c2
Compare
Yes, that's what I meant. |
ad6c7c2
to
136ddcb
Compare
User permissions are stored in a separate table within the database. These permissions will be automatically migrated when running sortinghat-admin upgrade. Signed-off-by: Jose Javier Merchante <jjmerchante@bitergia.com>
136ddcb
to
9d02eb1
Compare
The previous release included the users' permissions in the Group Django model. In the new release, they are included in the Tenant model. This code migrates the permissions for all the users.
Related to #849