Split Permission and StoredPermission class and model into different modules. Simplified the Permission class.

This commit is contained in:
Roberto Rosario
2015-06-28 01:02:49 -04:00
parent d26402974a
commit 1c084aa07b
58 changed files with 354 additions and 386 deletions

View File

@@ -15,7 +15,7 @@ from django.utils.http import urlencode, urlquote
from django.utils.translation import ugettext_lazy as _
from acls.models import AccessEntry
from permissions.models import Permission
from permissions import Permission
logger = logging.getLogger(__name__)
@@ -157,7 +157,7 @@ class Link(object):
# too
if self.permissions:
try:
Permission.objects.check_permissions(request.user, self.permissions)
Permission.check_permissions(request.user, self.permissions)
except PermissionDenied:
# If the user doesn't have the permission, and we are passed
# an instance, check to see if the user has at least ACL