Am Freitag, 24. März 2017 14:12:44 UTC+1 schrieb Collin Anderson:
>
> Hi Thomas,
>
> "If the user should have all permissions, then why not give him all these 
> permissions at database level?" - I have some use cases where there are 
> only 3-5 people that need to log into the admin. I don't really need to set 
> different levels of access for different people. I also don't want to have 
> to go through and add new permissions to every person every time I add a 
> model. So, I just mark them all as is_superuser and don't use permissions 
> at all. It keeps things simple.
>
> Something like this might handle your situation:
> class MyUser:
>     # etc
>     is_superuser = False
>     is_staff = property(lambda u: u.has_perm('admin'))
>
>
Yes, configuring permission each time you add a model makes no fun. I have 
to think about this again.

Regards,
  Thomas Güttler

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/abd56b3b-a0af-4fd8-847e-1ea7d06dd9b6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to