Merge branch 'master' of github.com:pydanny/django-admin2

This commit is contained in:
Daniel Greenfeld 2013-05-19 12:10:20 +02:00
commit 5fee2dd76b

View file

@ -39,7 +39,6 @@ class AdminModel2Mixin(Admin2Mixin, AccessMixin):
def dispatch(self, request, *args, **kwargs):
# Check if user has necessary permissions. If the permission_type isn't specified then check for staff status.
print "distpatch perm check:", self.permission_type
has_permission = self.modeladmin.has_permission(request, self.permission_type) \
if self.permission_type else request.user.is_staff
# Raise exception or redirect to login if user doesn't have permissions.