Kai Diefenbach avatar Kai Diefenbach committed c7bafcd

Import utils

Comments (0)

Files changed (1)

permissions/models.py

 from django.contrib.contenttypes.models import ContentType
 from django.utils.translation import ugettext_lazy as _
 
+import permissions.utils
+
 class PermissionBase(object):
     """Mix-in class for permissions.
     """
             The permission which should be checked. Must be the codename of
             the permission.
         """
-        return permission.utils.is_inherited(self, codename)
+        return permissions.utils.is_inherited(self, codename)
 
     def add_role(self, principal, role):
         """Adds a local role for the principal.
 
     def remove_role(self, principal, role):
         """Adds a local role for the principal to the object.
-        
+
         **Parameters:**
 
         principal
         **Parameters:**
 
         principal
-            The principal (user or group) from which all local roles are 
+            The principal (user or group) from which all local roles are
             removed.
         """
-        return permissions.utils.remove_local_roles(self, principal, role)
+        return permissions.utils.remove_local_roles(self, principal)
 
 class Permission(models.Model):
     """A permission which can be granted to users/groups and objects.
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.