Also pass the prefix in the document cleaning method
authorSverre Rabbelier <srabbelier@gmail.com>
Sat, 21 Feb 2009 20:13:46 +0000
changeset 1440 58ac0b3f59ac
parent 1439 4d78f2f71ce5
child 1441 e633906ed88d
Also pass the prefix in the document cleaning method The prefix is needed to determine how far to walk up the scope. Patch by: Sverre Rabbelier
app/soc/logic/cleaning.py
--- a/app/soc/logic/cleaning.py	Sat Feb 21 17:58:45 2009 +0000
+++ b/app/soc/logic/cleaning.py	Sat Feb 21 20:13:46 2009 +0000
@@ -452,6 +452,11 @@
 
   roles = checker.getMembership(access_level)
 
-  if not rights.hasMembership(roles, {'scope_path': scope_path}):
+  django_args = {
+      'scope_path': scope_path,
+      'prefix': prefix
+      }
+
+  if not rights.hasMembership(roles, django_args):
     self._errors[field] = ErrorList([DEF_NO_RIGHTS_FOR_ACL_MSG])
     del self.cleaned_data[field]