f user1 loged in means he has to see only
>>
>>
>>
>> name
>>
>> age
>>
>> department
>>
>> user(manytomanyfiled)
>>
>> xyz
>>
>> 23
>>
>> cs
>>
>> user1
>>
>> abc
>>
>> 24
>&
ec
>
> user1
>
>
>
> And if user2 login means
>
> name
>
> age
>
> department
>
> user(manytomanyfiled)
>
> pqr
>
> 25
>
> me
>
> user2
>
>
>
>
>
> Kindly let me know below explanation is serving my purpose?
>
>
>
&g
user1
>>
>> abc
>>
>> 24
>>
>> ec
>>
>> user1
>>
>>
>>
>> And if user2 login means
>>
>> name
>>
>> age
>>
>> department
>>
>> user(manytomanyfiled)
>>
>> pqr
>>
>> 25
>
> department
>
> user(manytomanyfiled)
>
> pqr
>
> 25
>
> me
>
> user2
>
>
>
>
>
> Kindly let me know below explanation is serving my purpose?
>
>
>
> Best Regards,
>
> HULI
>
>
>
> *From: *maninder singh Kumar
department
user(manytomanyfiled)
pqr
25
me
user2
Kindly let me know below explanation is serving my purpose?
Best Regards,
HULI
From: maninder singh Kumar
Sent: Sunday, January 19, 2020 2:46 PM
To: django-users@googlegroups.com
Subject: Re: Role based access
Django has an authentication model of :
1
t; [image: http://]about.me/maninder.s.kumar
>> <http://about.me/maninder.s.kumar?promo=email_sig>
>>
>>
>>
>>
>> On Sun, Jan 19, 2020 at 3:04 PM Doddahulugappa.B <
>> doddahuluga...@gmail.com> wrote:
>>
>>> Hi team,
>>>
>>
age: --]
>
> Maninder Kumar
> [image: http://]about.me/maninder.s.kumar
> <http://about.me/maninder.s.kumar?promo=email_sig>
>
>
>
>
> On Sun, Jan 19, 2020 at 3:04 PM Doddahulugappa.B
> wrote:
>
>> Hi team,
>>
>> How to make role based acces
; Hi team,
>
> How to make role based access in django. For ex.
>
> If employee names and their department in one table.
>
> And also we assign department to user. With manytomany field.. So how can
> i display only the records of employees and their department which is
> assi
You can assign django groups from user model as department and give special
permission to that group
On Sun 19 Jan, 2020, 3:04 PM Doddahulugappa.B,
wrote:
> Hi team,
>
> How to make role based access in django. For ex.
>
> If employee names and their department in one table.
&
Hi team,
How to make role based access in django. For ex.
If employee names and their department in one table.
And also we assign department to user. With manytomany field.. So how can
i display only the records of employees and their department which is
assigned to the user.
Kindly help
in your viewset class,you could rewrite get_permissions to set which
permissions you want on action
def get_permissions(self, *args, **kwargs):
if self.action == 'create':
self.permission_classes = (AllowAny,)
elif self .action == 'login':
self.permiss
I am creating REST API for Product, which has following Permission,
(create_product, view_product, edit_product). In my Project I am having various
users with different roles (Ex: Producer, Retailer, Consumer,...etc). I am
assigning permission to individual Roles. I am using Django Group Permiss
12 matches
Mail list logo