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

get_group_permissions is returning an empty set #4

Closed
JohnieLee opened this issue Jan 28, 2013 · 1 comment
Closed

get_group_permissions is returning an empty set #4

JohnieLee opened this issue Jan 28, 2013 · 1 comment

Comments

@JohnieLee
Copy link
Contributor

Line 24 is always returning an empty set for me.

group_perm_lists = GroupPermissionList.objects.filter(group__id__in=user_perm_obj.group_fk_list)

It seems to be related to this bug django-nonrel/djangotoolbox#8 where subqueries (ie __in) will fail silently.

There are two failing unit tests that may be related to this:

  FAIL: test_custom_perms (permission_backend_nonrel.tests.BackendTest)
Traceback (most recent call last):
  File "/Users/johnie/Projects/gitrepos/demo/venv_demo/src/django-permission-backend-nonrel/permission_backend_nonrel/tests.py", line 213, in test_custom_perms
self.assertEqual(user.get_all_permissions(), exp)
AssertionError: Items in the second set but not the first:
u'auth.test_group'


FAIL: test_update_permissions_group (permission_backend_nonrel.tests.BackendTest)
Traceback (most recent call last):
  File "/Users/johnie/Projects/gitrepos/demo/venv_demo/src/django-permission-backend-nonrel/permission_backend_nonrel/tests.py", line 108, in test_update_permissions_group
  self.assertEqual(user.has_perm('auth.test'), True)
AssertionError: False != True
@fhahn
Copy link
Member

fhahn commented Jan 31, 2013

thanks for the patch, I've merged the pull request.

cheers

@fhahn fhahn closed this as completed Jan 31, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants