You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a problem using django-cas. when I try to use the Django has_perm method to authorize some access with user permissions in code. When I use the method has perm with Middleware and Auth Backend from CAS the method does not work as it should, it always returns False unless the user is superuser. could you please help me with this? . I try the same action deactivating CAS auth and using local Auth and the method work propertly.
Thanks in advance.
Hello,
I have a problem using django-cas. when I try to use the Django has_perm method to authorize some access with user permissions in code. When I use the method has perm with Middleware and Auth Backend from CAS the method does not work as it should, it always returns False unless the user is superuser. could you please help me with this? . I try the same action deactivating CAS auth and using local Auth and the method work propertly.
Thanks in advance.
Django Version 1.11.4 and 1.11.5
Pdb without CAS client active (Local Auth).
(Pdb) user
<User: baseproject>
(Pdb) perm
'auth.pruebaapi'
(Pdb) user.user_permissions.all()[0]
<Permission: auth | permiso | pruebaapi>
(Pdb) user.user_permissions.all()[0].codename
'pruebaapi'
(Pdb) user.has_perm(perm)
True
(Pdb)
Pdb with Cas client active
(Pdb) user
<User: baseproject>
(Pdb) perm
'auth.pruebaapi'
(Pdb) user.user_permissions.all()[0]
<Permission: auth | permiso | pruebaapi>
(Pdb) user.user_permissions.all()[0].codename
'pruebaapi'
(Pdb) user.has_perm(perm)
False
(Pdb) Why ?
The text was updated successfully, but these errors were encountered: