django-access
django-access copied to clipboard
Constant instead of callable check
The simplest way to check rights is to return constant value, f.e. True, False, or {}. In case of constant grant type, the code should be allowed to look like:
ApplyAblePlugin(
changeable=False,
deleteable=False,
),
instead of
ApplyAblePlugin(
changeable=lambda queryset, request: False,
deleteable=lambda queryset, request: False,
),