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

How can I do to have the django-guardian reflecting on my apps in the admin panel?

I can see no changes with django-guardian, even using the GuardedModelAdmin. I would like that the user could see and edit only the records allowed (not just owned, but allowed) for him. But even appending all permissions the user still cannot see…
Max Ferreira
  • 468
  • 1
  • 4
  • 19
0
votes
1 answer

Assiging permissions with guardian's shortcut assign_perm results in 'NoneType' object has no attribute 'objects'

I have two applications in my Django project, let's assume it's appA and appB. Those applications are installed from external packages via pip install. Both of them have additional permissions in their models: appA has got: class Meta: …
Marius
  • 76
  • 1
  • 6
0
votes
1 answer

Checking Permissions in django TestCase

I am trying to test my create_user view in a django1.8 app. I have the following in a TestCase: new_user = User.objects.get(username='test') basic_user_group = Group.objects.get(name='basic_users') self.assertIn(basic_user_group,…
skolsuper
  • 629
  • 1
  • 6
  • 21
0
votes
2 answers

ImportError: no module named guardian

I'm new to Django, so generally I am the cause of most of my problems, but I can't figure out why the django-guardian 1.3 app won't install. I'm using Django 1.7 in a virtual environment, my OS is Windows 8.1. I followed the installation directions…
Kienen Mason
  • 1
  • 1
  • 4
0
votes
1 answer

Django-Guardian/Tastypie: Toggle object-level permissions from private to public

I am using django-guardian to implement object-level permissions in my tastypie api and I would like to be able to toggle an instance of a resource's permissions between private, and public. For example, I have an Event resource. When a User…
gthmb
  • 808
  • 5
  • 10
0
votes
1 answer

Django South Guardian

I was trying to update the db using South. Created the new classes in models.py, usual stuff. Working with WinXP, Django 1.6.8, south 0.8.4, django-guardian 1.3.0.dev, virtual-env 1.10.1 Using the usual python manage.py schemamigration app_name…
Tommy Gibbons
  • 184
  • 1
  • 2
  • 12
0
votes
0 answers

Blank page and the code 403 on view

I want to add permissions for users who are in the Employee group that in order to be able to see the view, but do not add. When I go to view with decorator I get a blank page and the code 403. I use django-guardian. MODEL class…
mark
  • 653
  • 1
  • 10
  • 23
0
votes
1 answer

Django admin objects permissions

I'm struggling at building a website with Django. On that website, I want to have a lot of information about TV shows. I want my user to be able to insert and modify information. The information needs to be moderated, a change should not be…
Spoutnik16
  • 834
  • 1
  • 10
  • 19
0
votes
1 answer

django-guardian DoesNotExist error when adding group permission

I want to add per object permissions to my django app, but I can't seem to get the basics working. I am using python-social-auth also but I didn't think that would be an issue as auth.User still works normally. I seem to be doing everything…
Colin Murphy
  • 1,105
  • 3
  • 12
  • 22
0
votes
1 answer

Django forms and django-guardian: showing filtered list of UserObjectPermissions

I want an administrator to be able to assign/remove django-guardian permissions to a person and how they relate to a Project object, based on what permissions available to said object. The screen to look like this: The project is provided in the…
Rob Grant
  • 7,239
  • 4
  • 41
  • 61
0
votes
1 answer

Mixing system and object level permissions in django

I'm using django 1.6 with REST. I'm trying to incorporate object level as well as system level permissions into my app. After reading a bit I found that django-gurdian is the best way to go (as it play nice with all the other apps). I'm a bit…
haki
  • 9,389
  • 15
  • 62
  • 110
0
votes
1 answer

How to add django-guardian permisions after object was created in CreateView in django?

I got simple CreateView that is using basic ModelForm and I want to add can_view permission for current user for this specific object after it's created . As I understand it must be done after saving object. Should I use post_save signals for this?…
0
votes
1 answer

django-guardian custom user permissions

Setup I've just started working with django-guardian and have straight away run into some obstacles. I'm using custom users by extending the AbstractBaseUser class. I followed this example to setup my models.py and admin.py. I also followed the…
0
votes
0 answers

group.get_all_permissions() in Django

Is there a such thing as user.get_all_permissions() for groups? I need a list of all of the group's permissions so that I can find names to reference these same permissions later.
mh00h
  • 1,824
  • 3
  • 25
  • 45
0
votes
1 answer

How to combine an admin module from different ModelAdmin

Because I need to display the map for a location field I was using gisadmin.OSMGeoAdmin but now I installed django-guardian to have object-level permissions.. now my module has to be with GuardedModelAdmin losing the map field to a simple…
po5i
  • 548
  • 5
  • 19
1 2 3
9
10