Although I found it very interesting at first, this looks dangerous since it changes how the API work for all apps installed. Example, guardian makes calls to user.has_perm(perm) in several places to check model permissions. Although periphery features, they would be broken.
From: Florian Apolloner Sent: Wednesday, January 17, 2018 12:45 PM To: Django developers (Contributions to Django itself) Subject: Re: Default Authorization BackEnd Denying Permissions if ObjectProvided On Wednesday, January 17, 2018 at 5:48:03 PM UTC+1, Mehmet Dogan wrote: Florian, Can you clarify this part, I am not sure what you meant: class MyBackend(ModelBackend): def has_perm(…, obj=None,…): if obj: obj = None return super().has_perm(…) something along the lines of this should do it. -- You received this message because you are subscribed to a topic in the Google Groups "Django developers (Contributions to Django itself)" group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/django-developers/MLWfvPPVwDk/unsubscribe. To unsubscribe from this group and all its topics, 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/ff0142a5-cca0-4d8c-8497-b988b04ba4ca%40googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- 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/5a5fac41.1b5b9d0a.5a28c.069e%40mx.google.com. For more options, visit https://groups.google.com/d/optout.