kmmbvnr / django-guardian-ng

Per object permissions for Django
https://django-guardian.readthedocs.io/
Other
1 stars 0 forks source link

Add an argument to allow checks even if is_active is false? #135

Open kmmbvnr opened 5 months ago

kmmbvnr commented 5 months ago

Original issue: https://github.com/django-guardian/django-guardian/issues/343

kmmbvnr commented 5 months ago

The thing that should be fixed

it also breaks bulk_assign_perm: https://github.com/django-guardian/django-guardian/blob/devel/guardian/managers.py#L70

All other parts are overcome by temporary setting .is_active to a user object without storing them into the database

kmmbvnr commented 5 months ago

bulk_create can be fixed by using ignore_conflicts=True flag

The rest django-guardian behaviour matches the Django itself.

List of user permission could be received by temporary setting .is_active to a user instance without persisting it into the db