Questions tagged [django-guardian]

django-guardian is an implementation of per object permissions on top of Django's authorization backend

django-guardian is an implementation of per object permissions [1] on top of Django's authorization backend,

Online documentation is available at https://django-guardian.readthedocs.io/.

140 questions
0
votes
1 answer

Django, South, and Guardian: Migrate

I have two users, mh00h1 and mh00h2. I also have modelA that defines the following in my models.py: class Meta: permissions = ( ('read','read'), ('write','write'), ) From a shell, I went to set permissions: >>>> frhde =…
mh00h
  • 1,824
  • 3
  • 25
  • 45
0
votes
1 answer

role based access using django-guardian

I am using django-guardian for giving role based permission and django-userena for user profiling. I have three kind of users Admin, sub-admin, employee. Admin can add sub-admin and sub-admin can add employees. I have created three groups in…
0
votes
1 answer

permission_required_or_403 decorator on an 'Add or Edit'?

I have a typical django view setup for adding a new or editing a current 'book' model (through forms). This is of the nature: def bookedit(request, bookid=None): if bookid: book = get_object_or_404(Book, pk=bookid) else: …
GerryDevine
  • 111
  • 1
  • 9
0
votes
1 answer

Customize Installed Apps on Django

in my server I have a lot of apps installed like, facebook_connect, userena, guardian and so on... For example, I realized that if I customize the: django-userena / userena / templates / userena / emails / activation_email_message.txt {% load i18n…
-1
votes
1 answer

Avoid N+1 problem fetching users and permissions in Django

I need to fetch a list of users and a list of permissions (guardian object permissions) each user has. The problem is that every way I am trying to do this runs into the N+1 problem. Whether I simply loop over the user list and get permissions from…
Mad Wombat
  • 14,490
  • 14
  • 73
  • 109
1 2 3
9
10