More declarative way to tie permissins to CBV

24 views
Skip to first unread message

guettli

unread,
Mar 22, 2016, 3:40:43 AM3/22/16
to Django users
My goal: If user "foo" comes to the me (playing the admin role) and says: I don't have permissions for URL "foo-url", then I want to enter
the URL and the username into some admin interface and then the this should tell me why the user is allowed or not allowed to access the URL.

Example output:

User "foo" cannot access "foo-url" because he is missing the permission "bluefoo".

 or

User "foo" can access "foo-url" because he is has the permission "bluefoo" because he is member in the group "bluegroup".


AFAIK this is not possible at the moment.

Our applications grow and the permission handling gets more complex. I want a tool for operators/admins to check
the permission **and** the solution like "he needs perm ...". Just returning a boolean like: allowed or not-allowed does
not help.

Of course this should only be visible to admins. Normal users should get "permission denied".

What do you think?

Regards,
  Thomas Güttler

Reply all
Reply to author
Forward
0 new messages