Open LokkiDog opened 5 months ago
Actually, the apply_able
returns a value from the user-defined functional authorization checks, defined by the ApplyAblePlugin
. The user-defined functional check should obviously return queryset in any case.
Contrary, the CheckAblePlugin
user-defined functional authorization check should return either False, or dictionary.
Therefore, the most probable problem is your own access profile, where you probably use ApplyAblePlugin
with your custom functional check returning boolean, like:
ApplyAblePlugin(
changeable=lambda queryset, request: return False
)
instead of properly defined:
ApplyAblePlugin(
changeable=lambda queryset, request: return queryset.none()
)
An error occurs when checking form fields for changes (as far as I understand it).
Django==5.0.6 django-access==0.1.2b2
The error is in the file access/admin.py 498
perm = bool(manager.apply_able(ability, obj.__class__.objects.filter(id=obj.id), request).exists()))
manager.apply_able(ability, obj.__class__.objects.filter(id=obj.id), request)
- already gives bool value,exists()
- unnecessaryHere is the error trace: