Skip to content
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

sync_roles not updating permissions for each role. #133

Open
rduke199 opened this issue Sep 27, 2021 · 1 comment
Open

sync_roles not updating permissions for each role. #133

rduke199 opened this issue Sep 27, 2021 · 1 comment

Comments

@rduke199
Copy link

rduke199 commented Sep 27, 2021

Even though I have available_permissions assigned in roles.py and ROLEPERMISSIONS_REGISTER_ADMIN set to True in settings.py, the permissions for each role are not syncing. I run python mangage.py sync_roles but the roles in roles.py do not have the permissions assigned to them.

My roles.py files looks like this:

from rolepermissions.roles import AbstractUserRole

class Scholar(AbstractUserRole):
available_permissions = {
'view_private_molecules': True,
'upload_data': True,
'access_restapi_molecules': True,
'access_restapi_nlp': True,
'view_documents': True,
}

@thraxil
Copy link

thraxil commented Aug 2, 2023

@rduke199 this is pretty late and you've likely already figured this out, but having run across it myself recently, I think you just need to add the --reset_user_permissions flag when you run sync_roles.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants