django-permissions Questions

1

Solved

I am using DRF for writing API's. I would like to give different permissions for each view in my Modelviewsets. I have two groups(customers and staff). I have filtered them as Isstaff and Iscustome...

2

Solved

According to the docs custom permissions can be created and used like this: class Task(models.Model): ... class Meta: permissions = ( ("view_task", "Can see available tasks"), ) Using the p...
Parrot asked 10/10, 2016 at 8:46

3

I've added permission to my model and I would like to create a group in admin that uses this permission. The problem is that the new permission is not listed in the permissions list. is there som...
Budde asked 26/4, 2013 at 12:5

3

Solved

I am trying to provide privacy settings at the model's field level for users. So a user can decide which data he wants to display and which data he wants to hide. Example: class Foo(models.Model...
Isle asked 28/5, 2015 at 6:44

2

Solved

I have following functions in rest API for User model. I want to set AllowAny permission on only POST request. Can someone help me out. class UserList(APIView): """Get and post users data.""" d...
Moniliform asked 5/6, 2016 at 12:57

2

Solved

Is it possible to set Django Admin page to show which user is in which group? And is it possible to be able to add a user into a group using the Django Admin page? If yes, how? Now, I'm adding prog...

1

I want to add a permission under auth_permission table. When I insert another permission manually, I need to insert a content_type_id also. This is referenced to content_type table. I dont know wha...
Marroquin asked 1/1, 2014 at 16:24

1

Solved

In a Django 1.8 project, I have a migration that worked fine, when it had the following code: # -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations from...
Goutweed asked 21/7, 2015 at 12:58

4

Solved

In my Django application, I have certain permissions which users need in order to access certain views (using django.contrib.auth). This works fine, using the @permission_required decorator on my v...
Steep asked 11/8, 2010 at 17:39

1

Solved

Default behaviour seems to be new users have no permissions and no groups. However I'd like not to have to manually grant every single new users basic permissions, and I'd assume they'd like not to...
Periotic asked 10/7, 2015 at 6:54

2

Solved

I want to create groups in django programmatically, but not in a view, but rather in something like model (for example using migrations). How to do it? There's no information about it in google and...
Goon asked 3/8, 2014 at 14:10

3

I am looking for the best way to implement user permissions to allow users to edit specific model instances. For instance, I have such two models: model RadioChannel(models.Model): name = models...
Ugaritic asked 2/11, 2010 at 8:54

3

In Django what's the best way to implement templates with extra functionality for users with 'admin' permissions. I'm not sure if I should create a set of completely different views specific for ...
Custom asked 25/2, 2012 at 20:29

3

Solved

I have a model class Project and for each model instance, there should be a 'group' of users who may edit that instance. I guess I could add another model class called ProjectEditor to add those ed...
Correspond asked 8/8, 2010 at 16:51

6

Solved

Is it possible to inherit permissions from an abstract model in Django? I can not really find anything about that. For me this doesn't work! class PublishBase(models.Model): class Meta: abstrac...
Foehn asked 3/6, 2010 at 10:13

3

I would love to have more granular permission in my Django project, but can't decide what app to use. What I have is something like: class Item(models.Model): name = models.CharField(max_length=6...
Philipp asked 25/1, 2012 at 13:52

5

Is there a way to do row level permissions in django? I thought there wasn't but just noticed this in the docs: Permissions can be set not only per type of object, but also per specific object ...
Complacency asked 9/8, 2012 at 20:40

2

Solved

I've found 3 row-level permission solutions for Django 1.2+ django-object-permissions django-guardian django-authority Could someone tell if there is any recommended more than the others, what ...
Iatrochemistry asked 18/6, 2012 at 12:10

1

Solved

I'm modeling a quite complex system in Django. I will post here only the relevant part of it and I will show simplified use cases diagrams to better express my ideas. I basically have 2 type of us...

4

I'm trying to get role-based permissions working for django-nonrel for GAE. Out of the box, it didn't seem to work, probably because of the implicit many-to-many relationship between Users and Gr...

5

Solved

I am using custom permissions in my Django models like this: class T21Turma(models.Model): class Meta: permissions = (("can_view_boletim", "Can view boletim"), ("can_view_mensalidades", "Can vi...
Adenoidectomy asked 16/11, 2009 at 12:51

1

I am starting an app that has a complex permission structure that will inevitably be managed by the users themselves. I have the following permissions in the model: class Meta: permissions = ( (...
Melioration asked 26/10, 2012 at 3:54

2

Can anyone suggest a good open source app that uses django-guardian? I'm not having trouble understanding the API, but I'd love to see an example to get a feel for implementation best practice (dat...

1

Solved

I've been searching Google and Stackoverflow for the last 3 days now and couldn't find anything similar. I'd like to extend or use the django groups and permissions. Let's say we got some Projects...
Ophidian asked 15/10, 2012 at 9:36

1

Solved

I need to implement user rights for user groups (pretty similar to facebook groups). For example, each group can have members with rights like: can_post, can_delete, can_ban, etc. Of course, one us...
Krawczyk asked 12/9, 2012 at 17:51

© 2022 - 2024 — McMap. All rights reserved.