예제 #1
0
 def test_is_admin(self):
     self._create_simple_setup()
     joe = User.objects.get(username='******')
     self.assertTrue(is_site_admin(joe))
예제 #2
0
 def has_change_permission(self, request, obj=None):
     # should be available only to superusers and to site admins that
     #   have at least one site under their control
     user = request.user
     return is_site_admin(user) and len(get_administered_sites(user)) > 0
예제 #3
0
 def test_is_admin(self):
     self._create_simple_setup()
     joe = User.objects.get(username='******')
     self.assertTrue(is_site_admin(joe))
예제 #4
0
 def has_change_permission(self, request, obj=None):
     # should be available only to superusers and to site admins that
     #   have at least one site under their control
     user = request.user
     return is_site_admin(user) and len(get_administered_sites(user)) > 0