Added missing role_name to org_admin Logic.
authorLennard de Rijk <ljvderijk@gmail.com>
Fri, 24 Jul 2009 20:13:40 +0200
changeset 2673 cecb3a669527
parent 2672 7bc9d3b962af
child 2674 d3e9ea65e3ab
Added missing role_name to org_admin Logic. Also reordered keyword arguments in role Logics.
app/soc/logic/models/club_admin.py
app/soc/logic/models/club_member.py
app/soc/logic/models/host.py
app/soc/logic/models/mentor.py
app/soc/logic/models/org_admin.py
app/soc/logic/models/student.py
--- a/app/soc/logic/models/club_admin.py	Fri Jul 24 19:59:26 2009 +0200
+++ b/app/soc/logic/models/club_admin.py	Fri Jul 24 20:13:40 2009 +0200
@@ -40,8 +40,9 @@
     """Defines the name, key_name and model for this entity.
     """
 
-    super(Logic, self).__init__(role_name=role_name, model=model,
-                                base_model=base_model, scope_logic=scope_logic,
+    super(Logic, self).__init__(model=model, base_model=base_model,
+                                scope_logic=scope_logic,
+                                role_name=role_name,
                                 disallow_last_resign=disallow_last_resign)
 
   def _onCreate(self, entity):
--- a/app/soc/logic/models/club_member.py	Fri Jul 24 19:59:26 2009 +0200
+++ b/app/soc/logic/models/club_member.py	Fri Jul 24 20:13:40 2009 +0200
@@ -39,8 +39,9 @@
     """Defines the name, key_name and model for this entity.
     """
 
-    super(Logic, self).__init__(role_name=role_name, model=model,
-                                base_model=base_model, scope_logic=scope_logic,
+    super(Logic, self).__init__(model=model, base_model=base_model,
+                                scope_logic=scope_logic,
+                                role_name=role_name,
                                 disallow_last_resign=disallow_last_resign)
 
   def getRoleLogicsToNotifyUponeNewRequest(self):
--- a/app/soc/logic/models/host.py	Fri Jul 24 19:59:26 2009 +0200
+++ b/app/soc/logic/models/host.py	Fri Jul 24 20:13:40 2009 +0200
@@ -40,11 +40,11 @@
     """Defines the name, key_name and model for this entity.
     """
 
-    super(Logic, self).__init__(role_name=role_name, model=model,
-                                base_model=base_model, scope_logic=scope_logic,
+    super(Logic, self).__init__(model=model, base_model=base_model,
+                                scope_logic=scope_logic,
+                                role_name=role_name,
                                 disallow_last_resign=disallow_last_resign)
 
-
   def _onCreate(self, entity):
     """Marks the Sponsor for this Host as active it's status is new.
     """
--- a/app/soc/logic/models/mentor.py	Fri Jul 24 19:59:26 2009 +0200
+++ b/app/soc/logic/models/mentor.py	Fri Jul 24 20:13:40 2009 +0200
@@ -48,8 +48,9 @@
     """Defines the name, key_name and model for this entity.
     """
 
-    super(Logic, self).__init__(role_name=role_name, model=model,
-                                base_model=base_model, scope_logic=scope_logic,
+    super(Logic, self).__init__(model=model, base_model=base_model,
+                                scope_logic=scope_logic,
+                                role_name=role_name,
                                 disallow_last_resign=disallow_last_resign)
 
   def canResign(self, entity):
--- a/app/soc/logic/models/org_admin.py	Fri Jul 24 19:59:26 2009 +0200
+++ b/app/soc/logic/models/org_admin.py	Fri Jul 24 20:13:40 2009 +0200
@@ -35,12 +35,13 @@
 
   def __init__(self, model=soc.models.org_admin.OrgAdmin,
                base_model=soc.models.role.Role, scope_logic=org_logic,
-               disallow_last_resign=True):
+               role_name='org_admin', disallow_last_resign=True):
     """Defines the name, key_name and model for this entity.
     """
 
     super(Logic, self).__init__(model=model, base_model=base_model,
                                 scope_logic=scope_logic,
+                                role_name=role_name,
                                 disallow_last_resign=disallow_last_resign)
 
   def _onCreate(self, entity):
--- a/app/soc/logic/models/student.py	Fri Jul 24 19:59:26 2009 +0200
+++ b/app/soc/logic/models/student.py	Fri Jul 24 20:13:40 2009 +0200
@@ -39,8 +39,9 @@
     """Defines the name, key_name and model for this entity.
     """
 
-    super(Logic, self).__init__(role_name=role_name, model=model,
-                                base_model=base_model, scope_logic=scope_logic,
+    super(Logic, self).__init__(model=model, base_model=base_model,
+                                scope_logic=scope_logic,
+                                role_name=role_name,
                                 disallow_last_resign=disallow_last_resign)