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

Giving user a role from the admin pages doesn't update permissions? #130

Open
AliD201 opened this issue Apr 15, 2021 · 1 comment
Open

Comments

@AliD201
Copy link

AliD201 commented Apr 15, 2021

Hope you are doing well.

when registering a new user in this part

    form = UserRegisterForm(request.POST)
    if form.is_valid():
        form.save() # store the user 
        username = form.cleaned_data.get('username')
        messages.success(request,f'  {username}  account created succefully')
        return redirect('login')

and then adding a group to that user through the admin page. the user permissions doesn't change, Why is that ?
i need to run sync_role for each user from the shell in order for it to sync

@filipeximenes
Copy link
Contributor

Hi @AliD201, did you read through this section of the docs? https://django-role-permissions.readthedocs.io/en/stable/admin.html#rolepermissions-user-admin

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