lukaszb/django-guardian — Issue #60: shortcut get_objects_for... doesnt work with multiple perms
Author: nikoneagee
Created: 2012-01-27 14:12:42+00:00
State: open

get_objects_for_group and
get_objects_for_user

return an empty list of object if the call is made with a perms parameter containing a list of perms ( eg ['perm1','perm2'] )

this comes from a bug at the end of those functions.
line 360
if codenames.issubset(obj_codenames):

should be replaced by:
if obj_codenames.issubset(codenames):

same on line 469.

the obj_codenames is (possibly) a subset of the requested codenames, not the other way around!