Use the new program property in mentor and role for an access check.
authorLennard de Rijk <ljvderijk@gmail.com>
Thu, 19 Feb 2009 08:10:25 +0000
changeset 1388 237f4cf6936d
parent 1387 857e6cc8ebc1
child 1389 da41001a097e
Use the new program property in mentor and role for an access check. Patch by: Lennard de Rijk Reviewed by: to-be-reviewed
app/soc/views/helper/access.py
--- a/app/soc/views/helper/access.py	Wed Feb 18 21:41:27 2009 +0000
+++ b/app/soc/views/helper/access.py	Thu Feb 19 08:10:25 2009 +0000
@@ -906,7 +906,7 @@
     # check if the user has a role for the retrieved program
     for role in role_list:
 
-      if role.scope.scope.key() == program_entity.key():
+      if role.program.key() == program_entity.key():
         # the current user has a role for the given program
         raise out_of_band.AccessViolation(
             message_fmt=DEF_ALREADY_PARTICIPATING_MSG)