Changes between Version 3 and Version 4 of Ticket #29012


Ignore:
Timestamp:
Jan 11, 2018, 11:14:57 AM (7 years ago)
Author:
Mehmet Dogan
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #29012 – Description

    v3 v4  
    1414First, and possibly the best, solution to this is that, django does not deny permission if obj argument is provided, but just ignores it. This way by properly ordering backends in the settings, it could be a fallback solution for the lower level checkers. This might be the move in the right direction, although it is backwards incompatible.
    1515
    16 A second solution is a keyword argument, such as `fallback_to_model=None`, that will allow lower-level checkers mimic the model level permissions that django does. If the first solution is not accepted, this is needed to get the necessary permissions with one round of polling (and without cluttering the code). It would still be a useful addition since it would allow backends to prefer to handle the fallback by themselves. Or, it would allow users who fallback by default override that behavior and not fallback (via a value of `False`), i.e., object level permissions are definitive.
     16A second solution is a keyword argument, such as `fallback_to_model=None`, that will allow lower-level checkers mimic the model level permissions that django does. Obviously, this is not DRY. But is needed if the first solution is not accepted to get the necessary permissions with one round of polling, and without cluttering the code. If it was accepted, it would still be a useful addition since it would allow backends to prefer to handle the fallback by themselves. Or, it would allow users who fallback by default override that behavior and not fallback (via a value of `False`), i.e., object level permissions are definitive.
    1717
Back to Top