суббота, 21 декабря 2013 г., 15:50:15 UTC+4 пользователь 
[email protected] написал:
>
> Also, from initial tests it appears that django-guardian is not setting 
> permissions with custom user. I wrote a small manage.py script to test that:
>
> from django.core.management.base import BaseCommand, CommandError
> from iiitd.models import *
> from guardian.shortcuts import assign_perm, remove_perm
>
> class Command(BaseCommand):
>     def handle(self, *args, **options):
>         user = MyUser.objects.filter(username='abc')[0]
>         stream = Stream.objects.filter(uuid='001')[0]
>         assign_perm('read_stream', user, stream)
>         print user.has_perm('read_stream', stream)
>         remove_perm('read_stream', user, stream)
>         print user.has_perm('read_stream', stream)
>
> It prints True in both cases.
> However, the guardian_userobjectpermission table is updating correctly 
> when I add or delete permissions. Confused. o.O
>


Hello, have you solved this bug?

Now I have the same behavior with django-1.6.2 and django-guardian-1.2.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/2ef4cbac-f3cc-4d75-ad96-6c766a123261%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to