Questions tagged [django-permissions]

django-permissions is a pluggable django app that provides per-object permissions for Django based on roles

django-permissions is a pluggable django app that provides per-object permissions for Django based on roles.

431 questions
0
votes
1 answer

Best approach for implementing configurable permissions and roles in Django

I'm working on a Django application and I need to implement configurable permissions and roles. I want to be able to add new roles and associate multiple tasks with each role for specific modules in my Django app. What would be the best approach to…
0
votes
0 answers

Copy permissions over to production database in django

My current development database is SQLITE3 that comes packaged with Django. I have set up a MySql database as production database. The migrations went through smoothly and all the tables are now set up correctly. We have two sets of users with their…
user1933205
  • 300
  • 4
  • 12
0
votes
1 answer

Dependant permissions in django rest framework

I have a query - Suppose I have a notebooks (Physics,Chemistry,Math,...) and I want to put note in these notebooks by implementing some permissions - If I have permissions to view notebooks and I must be able to see all/some note books in drop…
0
votes
0 answers

drf custom authentication backend gets executed on the path that doesn't need authentication

I am new to django and I am trying to add permissions from DRF to my project. Ever since I have set DEFAULT_AUTHENTICATION_CLASSES for REST_FRAMEWORK in django settings.py, all the requests are going to the authenticate method of my…
0
votes
1 answer

How can I build multiple versions of admins with different permissions in django

 For example in a Car Rental System where the car owner should have his admin interface to view, add and delete his cars and also view orders orders, pending payments, finished payments but he should not have access to other car_owners' admin…
SIMBA
  • 1
  • 1
0
votes
0 answers

can not update adminprofile model using restapi with dj rest auth even if change permission_classes = [AllowAny] despite it work with userprofile

i have adminprofile and userprofile models, i made restapi to update fields inside them when i use it with the userprofile it works , but with admin profile it give me this erorr error : **Code Details 401 Undocumented Error: Unauthorized Response…
0
votes
0 answers

Does mezzanine allow custom navigation items to be displayed according to a custom permission?

I have a system that uses mezzanine custom navigation items to display some navigation items. However, I want the navigation items to only be displayed if a user have a specific set of permissions which are custom and not really Model based. Does…
E_K
  • 2,159
  • 23
  • 39
0
votes
0 answers

Non admin users can access a view that is supposed to be restricted to admin users in django rest framework and simplejwt

I have made a custom user model inside my django backend and I have created a view that register a new user, but I have set the view only for admin users. When I tried to register a new user using a non admin account, it has also worked!! so the…
0
votes
1 answer

Admin. Register model in other app administration

In admin panel I'm looking to having all user related models in one app administration, including Group and Permission models, which are by default included in Authentication and authorization app. Is there a way of changing default render place of…
COSHW
  • 146
  • 8
0
votes
0 answers

Check if django permission works via shell

User has only change_post permission. I want to check in practice via shell if it works. It hasn't add_post permision. Creating an instance of a Post class with an user attribut it doesn't raise an error. How the user can try to 'add post' via…
kubaSpolsky
  • 357
  • 2
  • 10
0
votes
1 answer

How to restrict Django users from filling a form twice in different sessions

I have a form for employees to fill their bio data, I want to restrict the employees from viewing the form more than once. That is after filling the form, you can’t view the empty form anymore, you can only follow an update link to update the…
0
votes
1 answer

Custom permission in django rest framework

I want to write a custom permission to restrict access to the display picture of a user. My user profile model is called Member and the implementation is as follows: # imports class Member(models.Model): created_at =…
0
votes
2 answers

How do I apply higher permissions to child pages in Wagtail?

I am building an intranet site for my organization with Wagtail and we are in the process of adding a knowledge base. The entire site needs to be restricted to logged-in users, but certain pages need to only be accessible to users in certain…
miller9904
  • 109
  • 9
0
votes
1 answer

How to write permissions in a viewset with conditional statements in DRF?

I have a viewset written in DRF: class MyViewSet(ModelViewSet): serializer_class = MySerializer queryset = models.MyClass.objects.all() def get_serializer_class(self): permission = self.request.user.permission if…
0
votes
0 answers

How can I create authorization with dinamic roles in a Django backend, with the frontend built in React?

I am creating a system that implements authentication and authorization with React in the Frontend and Django. But Ich must implement dinamic roles and don't find how to make authorization in the backend, just in the front. How could I make that? I…