Users with groups not receiving permissions

0

I have created a series of users with different permissions in a Django application. Each user is assigned a group, which contains permissions. With those permits, I plan to give access or not to certain web pages, but for some reason the users do not have any permission.

This is the code I want to work:

@permission_required('entrada.can_add', login_url='acces_denegat')
def Entrada(request):
    return render(request, 'myapp/entrada.html')

This is the part of Admin:

Permissions of 'input_manager':

Creation of the user 'user_gestor_entrada' with the assigned group:

The user 'user_gestor_input' would have to have the permissions of his group, but when I do a print (request.user.user_permissions.all ()) , he returns an empty queryset:

How can I solve this?

    
asked by DavidMM 28.05.2018 в 11:44
source

0 answers