{"action":"created","issue":{"url":"https://api.github.com/repos/django-guardian/django-guardian/issues/247","labels_url":"https://api.github.com/repos/django-guardian/django-guardian/issues/247/labels{/name}","comments_url":"https://api.github.com/repos/django-guardian/django-guardian/issues/247/comments","events_url":"https://api.github.com/repos/django-guardian/django-guardian/issues/247/events","html_url":"https://github.com/django-guardian/django-guardian/pull/247","id":38846996,"number":247,"title":"Allow specifying an empty list of permissions for get_objects_for_user","user":{"login":"mitar","id":585279,"avatar_url":"https://avatars.githubusercontent.com/u/585279?v=3","gravatar_id":"","url":"https://api.github.com/users/mitar","html_url":"https://github.com/mitar","followers_url":"https://api.github.com/users/mitar/followers","following_url":"https://api.github.com/users/mitar/following{/other_user}","gists_url":"https://api.github.com/users/mitar/gists{/gist_id}","starred_url":"https://api.github.com/users/mitar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mitar/subscriptions","organizations_url":"https://api.github.com/users/mitar/orgs","repos_url":"https://api.github.com/users/mitar/repos","events_url":"https://api.github.com/users/mitar/events{/privacy}","received_events_url":"https://api.github.com/users/mitar/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":15,"created_at":"2014-07-27T17:58:25Z","updated_at":"2015-11-12T07:04:27Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/django-guardian/django-guardian/pulls/247","html_url":"https://github.com/django-guardian/django-guardian/pull/247","diff_url":"https://github.com/django-guardian/django-guardian/pull/247.diff","patch_url":"https://github.com/django-guardian/django-guardian/pull/247.patch"},"body":"This allows one to ask for all objects for which an user has any permission. In a way it mirrors `get_users_with_perms`.\r\n\r\nIn addition, I fixed how the final query is made. Instead of creating an in-memory list of all IDs and then passing it in, you can pass all IDs simply as a subquery. This both improves the query and also allows more complicated basic queries (I was getting an error that I cannot use OR for two queries with \"extra\"). Also, it works now with documents which do not have integers as primary keys (I have UUIDs and `int(v)` does not work).\r\n\r\nFixes #244."},"comment":{"url":"https://api.github.com/repos/django-guardian/django-guardian/issues/comments/156019479","html_url":"https://github.com/django-guardian/django-guardian/pull/247#issuecomment-156019479","issue_url":"https://api.github.com/repos/django-guardian/django-guardian/issues/247","id":156019479,"user":{"login":"mitar","id":585279,"avatar_url":"https://avatars.githubusercontent.com/u/585279?v=3","gravatar_id":"","url":"https://api.github.com/users/mitar","html_url":"https://github.com/mitar","followers_url":"https://api.github.com/users/mitar/followers","following_url":"https://api.github.com/users/mitar/following{/other_user}","gists_url":"https://api.github.com/users/mitar/gists{/gist_id}","starred_url":"https://api.github.com/users/mitar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mitar/subscriptions","organizations_url":"https://api.github.com/users/mitar/orgs","repos_url":"https://api.github.com/users/mitar/repos","events_url":"https://api.github.com/users/mitar/events{/privacy}","received_events_url":"https://api.github.com/users/mitar/received_events","type":"User","site_admin":false},"created_at":"2015-11-12T07:04:27Z","updated_at":"2015-11-12T07:04:27Z","body":"Great! Thanks!"}}