django-access icon indicating copy to clipboard operation
django-access copied to clipboard

Constant instead of callable check

Open nnseva opened this issue 7 years ago • 0 comments

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,
        ),

nnseva avatar Oct 08 '18 14:10 nnseva