Use the new program property in mentor and role for an access check.
Patch by: Lennard de Rijk
Reviewed by: to-be-reviewed
--- 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)