Added role_name and disallow_last_resign keyword params to OA and Mentor Logic.
authorMadhusudan.C.S <madhusudancs@gmail.com>
Wed, 26 Aug 2009 17:27:40 +0200
changeset 2806 c629e6697cf9
parent 2805 dc6625df73bf
child 2807 e716cd6a6de3
Added role_name and disallow_last_resign keyword params to OA and Mentor Logic. Reviewed by: Lennard de Rijk
app/soc/modules/ghop/logic/models/mentor.py
app/soc/modules/ghop/logic/models/org_admin.py
--- a/app/soc/modules/ghop/logic/models/mentor.py	Wed Aug 26 20:17:27 2009 +0530
+++ b/app/soc/modules/ghop/logic/models/mentor.py	Wed Aug 26 17:27:40 2009 +0200
@@ -36,12 +36,14 @@
 
   def __init__(self, model=soc.modules.ghop.models.mentor.GHOPMentor,
                base_model=soc.models.mentor.Mentor,
-               scope_logic=soc.modules.ghop.logic.models.organization):
+               scope_logic=soc.modules.ghop.logic.models.organization,
+               role_name='ghop_mentor', disallow_last_resign=False):
     """Defines the name, key_name and model for this entity.
     """
 
     super(Logic, self).__init__(model, base_model=base_model,
-                                scope_logic=scope_logic)
+                                scope_logic=scope_logic, role_name=role_name,
+                                disallow_last_resign=disallow_last_resign)
 
 
 logic = Logic()
--- a/app/soc/modules/ghop/logic/models/org_admin.py	Wed Aug 26 20:17:27 2009 +0530
+++ b/app/soc/modules/ghop/logic/models/org_admin.py	Wed Aug 26 17:27:40 2009 +0200
@@ -36,12 +36,14 @@
 
   def __init__(self, model=soc.modules.ghop.models.org_admin.GHOPOrgAdmin,
                base_model=soc.models.org_admin.OrgAdmin,
-               scope_logic=soc.modules.ghop.logic.models.organization):
+               scope_logic=soc.modules.ghop.logic.models.organization,
+               role_name='ghop_org_admin', disallow_last_resign=True):
     """Defines the name, key_name and model for this entity.
     """
 
     super(Logic, self).__init__(model, base_model=base_model,
-                                scope_logic=scope_logic)
+                                scope_logic=scope_logic, role_name=role_name,
+                                disallow_last_resign=disallow_last_resign)
 
 
 logic = Logic()