Navigation Menu

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

set any_perm to true when only one perm in get_objects_for_user #269

Open
cancan101 opened this issue Oct 16, 2014 · 0 comments
Open

set any_perm to true when only one perm in get_objects_for_user #269

cancan101 opened this issue Oct 16, 2014 · 0 comments

Comments

@cancan101
Copy link

If I understand what the any_perm argument in get_objects_for_user means, in this case: https://github.com/lukaszb/django-guardian/blob/dceb6beb5830746b624a7ac99d93949ff263fb98/guardian/shortcuts.py#L339 we can set any_perm=True. More generally we can do this when the len of perms is 1.

This should allow for simpler SQL below (see #148).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants