kmmbvnr / django-guardian-ng

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

Use shortcuts.assign_perm in example #33

Closed kmmbvnr closed 5 months ago

kmmbvnr commented 5 months ago

Original issue: https://github.com/django-guardian/django-guardian/pull/767

kmmbvnr commented 5 months ago

All those universal shortcuts has crazy code complexity, hard to optimize and hard to use, need to be spitted over assign_group_perm assign_user_perm.. assign_list... and etc

UserObjectPermission.objects.assign_perm('a_permission', group, obj=...) should not be allowed!

kmmbvnr commented 5 months ago

Also the readme could be changed, it's a minor fix and anyway would be changed in the future releases