In my opinion it is suboptimal to mix concepts.

The question you want to answer is: has a user a certain permission.
Django already has this concept built in and offers methods and decorators
to check for that.

Groups are a collection of users
Users can have permissions directly assigned to them - with a certain
number of users and permissions this easily becomes a UX nightmare.

Do not fight the framework by reinventing the wheel, use it.


On Mon, 12 Apr 2021 at 00:39, Hedrick Godson's <hedrickgod...@gmail.com>
wrote:

> 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
> <https://groups.google.com/d/msgid/django-users/CAJAxQDm4im_TLEapRFw4reKHOMDiOgZ92fc6ui95xUm23wT0Cg%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>


-- 
Best Regards,

Christian Ledermann

Dublin IE
Mobile : +44 7474997517

https://uk.linkedin.com/in/christianledermann
https://github.com/cleder/


<*)))>{

If you save the living environment, the biodiversity that we have left,
you will also automatically save the physical environment, too. But If
you only save the physical environment, you will ultimately lose both.

1) Don’t drive species to extinction

2) Don’t destroy a habitat that species rely on.

3) Don’t change the climate in ways that will result in the above.

}<(((*>

-- 
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/CABCjzWp95iJjaLhLovTG6thV0cAD2XcmHQpM0C%2BFwUveFXZG_w%40mail.gmail.com.

Reply via email to