Changes between Initial Version and Version 1 of Ticket #32255


Ignore:
Timestamp:
Dec 11, 2020, 4:56:34 PM (4 years ago)
Author:
Matteo Parrucci
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #32255

    • Property Summary User.has_perm should forward *args and **kwargs to allow more flexibility in authentication backendsUser.has_perm should forward **kwargs to allow more flexibility in authentication backends
  • Ticket #32255 – Description

    initial v1  
    77
    88**A possible solution**
    9 Adding *args and ^^*^^*kwargs to has_perm and has_perms signatures would allow greater flexibility for the custom authentication backends leaving intact what we have now. In my case, for example, I could check permission in my django-rules predicates having the the request passed in and check if I have rights for the current site, but I think my case is quite limited and all new authentication backends would benefit from this change.
     9Adding ^^*^^*kwargs to has_perm and has_perms signatures would allow greater flexibility for the custom authentication backends leaving intact what we have now. In my case, for example, I could check permission in my django-rules predicates having the the request passed in and check if I have rights for the current site, but I think my case is quite limited and all new authentication backends would benefit from this change.
Back to Top