Ticket #7304: 7304.patch
| File 7304.patch, 1.3 kB (added by mk, 4 months ago) |
|---|
-
a/django/contrib/auth/models.py
old new 358 358 def has_perm(self, perm): 359 359 return False 360 360 361 def has_perms(self, perm_list): 362 return False 363 361 364 def has_module_perms(self, module): 362 365 return False 363 366 -
a/tests/regressiontests/auth_backends/tests.py
old new 4 4 from sets import Set as set # Python 2.3 fallback 5 5 6 6 __test__ = {'API_TESTS': """ 7 >>> from django.contrib.auth.models import User, Group, Permission 7 >>> from django.contrib.auth.models import User, Group, Permission, AnonymousUser 8 8 >>> from django.contrib.contenttypes.models import ContentType 9 9 10 10 # No Permissions assigned yet, should return False except for superuser … … 69 69 True 70 70 >>> user.has_perms(['auth.test3', 'auth.test_group']) 71 71 True 72 73 # testing permissions of AnonymousUser 74 >>> user = AnonymousUser() 75 >>> user.has_perm('test') 76 False 77 >>> user.has_perms(['auth.test2', 'auth.test3']) 78 False 72 79 """}
