If your project involves user management where by some admins can create
custom users and grant them permissions I think it is better for you to use
Groups where by admins create a group e.g Librarian and then grant it
custom permissions and after that when admins create a new user he/she can
just choose a group where he can assign that user.
And in the case of permissions you can use custom decorators on ur views

On Mon, 12 Apr 2021, 02:31 Mike Dewhirst, <mi...@dewhirst.com.au> wrote:

> If you are using custom user, you can write methods which return booleans
> and which can be seen by the template.
>
> I wrote aasmall utility method is_member(groupname) which returns the
> boolean.
>
> I make liberal use of groups which work very well for me. In my custom
> user I can easily add a method to test whether that user is a member of
> that group.
>
> On the question in your subject line about permissions, I refuse to
> contemplate individual permissions. I will ALWAYS use group permissions and
> name my groups to represent roles.  Much more understandable by users (and
> me) and much much much more manageable than individual permissions.
>
> Ymmv
>
> Mike
>
>
> --
> (Unsigned mail from my phone)
>
>
>
> -------- Original message --------
> From: Manuel Buri <manuel.b...@gmail.com>
> Date: 12/4/21 08:48 (GMT+10:00)
> To: Django users <django-users@googlegroups.com>
> Subject: Do I really need Groups for permission management?
>
> Hi,
>
> I would love to know more about the advantages / disadvantages of using
> groups for permission management.
>
> Currently my project uses Booleans for is_workspace_owner (True or False)
> and consequently does not allow to show certain links via template
> if-checks as well as some user_passes_test. So basically I am doing the
> permission management link this which works pretty well. I am asking myself
> if I should change to groups or just leave it like this?
>
> What do you think?
>
> Thanks a lot for your inputs/opinions/tipps.
> Manuel
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/4ce20b42-df22-4f0d-b8c5-7d8ff5476bb0n%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/4ce20b42-df22-4f0d-b8c5-7d8ff5476bb0n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/607386e1.1c69fb81.d21fc.ed34SMTPIN_ADDED_MISSING%40gmr-mx.google.com
> <https://groups.google.com/d/msgid/django-users/607386e1.1c69fb81.d21fc.ed34SMTPIN_ADDED_MISSING%40gmr-mx.google.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAJAxQDm4im_TLEapRFw4reKHOMDiOgZ92fc6ui95xUm23wT0Cg%40mail.gmail.com.

Reply via email to