Re: Deprecate is_superuser, is_staff and is_active

2017-03-29 Thread guettli
Thank you for the inspiring conversation. Am Dienstag, 28. März 2017 14:31:33 UTC+2 schrieb Melvyn Sopacua: > > > > > From an object perspective, you need to send the invoice to the group > "Approvers". Again, best solved at the group level. > > And it's questionable if superusers should be

Re: Deprecate is_superuser, is_staff and is_active

2017-03-28 Thread Melvyn Sopacua
On Tuesday 28 March 2017 03:52:59 guettli wrote: > Am Montag, 27. März 2017 16:11:06 UTC+2 schrieb Melvyn Sopacua: > > On Friday 24 March 2017 04:31:32 guettli wrote: > > > I know this is a crazy idea, and it will get the "won't fix" tag > > > very > > > > > > soon. > > > > > > > > > > > >

Re: Deprecate is_superuser, is_staff and is_active

2017-03-28 Thread Anssi Kääriäinen
If you want to query for each user with given permission, then the query seems to be this (unfortunately not tested as I don't have a nice database to test this against): users = User.objects.filter( Q(is_superuser=True) |

Re: Deprecate is_superuser, is_staff and is_active

2017-03-28 Thread guettli
Am Montag, 27. März 2017 16:11:06 UTC+2 schrieb Melvyn Sopacua: > > On Friday 24 March 2017 04:31:32 guettli wrote: > > > I know this is a crazy idea, and it will get the "won't fix" tag very > > > soon. > > > > > > Nevertheless I want to speak it out. > > > > > > My use case: Get a queryset

Re: Deprecate is_superuser, is_staff and is_active

2017-03-27 Thread Melvyn Sopacua
On Friday 24 March 2017 04:31:32 guettli wrote: > I know this is a crazy idea, and it will get the "won't fix" tag very > soon. > > Nevertheless I want to speak it out. > > My use case: Get a queryset of users who have a given permission. I'm still thinking about this use case. Cause it's not

Re: Deprecate is_superuser, is_staff and is_active

2017-03-27 Thread guettli
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

Re: Deprecate is_superuser, is_staff and is_active

2017-03-24 Thread 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

Re: Deprecate is_superuser, is_staff and is_active

2017-03-24 Thread guettli
Am Freitag, 24. März 2017 13:41:10 UTC+1 schrieb Tim Graham: > > I don't think the current fields are so bad or nonsensical that it > warrants a change. Also, consider that every Django user would have to > learn how to use a new permissions setup. > > If you don't like the default permissions

Re: Deprecate is_superuser, is_staff and is_active

2017-03-24 Thread guettli
Am Freitag, 24. März 2017 12:42:03 UTC+1 schrieb Andrew Ingram: > > I've always felt that `is_staff` should be changed to a permission such as > `can_access_admin` provided by the Admin app itself. > > However, `is_superuser` is slightly different, in that it's not a > permission, but

Re: Deprecate is_superuser, is_staff and is_active

2017-03-24 Thread Tim Graham
I don't think the current fields are so bad or nonsensical that it warrants a change. Also, consider that every Django user would have to learn how to use a new permissions setup. If you don't like the default permissions structure, use a custom user model. On Friday, March 24, 2017 at

Re: Deprecate is_superuser, is_staff and is_active

2017-03-24 Thread Andrew Ingram
I've always felt that `is_staff` should be changed to a permission such as `can_access_admin` provided by the Admin app itself. However, `is_superuser` is slightly different, in that it's not a permission, but rather a flag that says "this user has EVERY permission". It's also potentially

Deprecate is_superuser, is_staff and is_active

2017-03-24 Thread guettli
I know this is a crazy idea, and it will get the "won't fix" tag very soon. Nevertheless I want to speak it out. My use case: Get a queryset of users who have a given permission. I would like to get this with a simple SQL statement. At the moment this query is complex and results in