Kai Diefenbach  committed f74ab58

Bugfix: has_permission, using roles=None as parameter

  • Participants
  • Parent commits c865c64

Comments (0)

Files changed (1)

File permissions/

     return True
-def has_permission(obj, user, codename, roles=[]):
+def has_permission(obj, user, codename, roles=None):
     """Checks whether the passed user has passed permission for passed object.
         If given these roles will be assigned to the user temporarily before
         the permissions are checked.
+    if roles is None:
+        roles = []
     if user.is_superuser:
         return True