# HG changeset patch # User Lennard de Rijk # Date 1246791429 -7200 # Node ID df7e4291c23c36b4c50b532e5ae13de0a332c553 # Parent 0a93ce6a1e8f438b9090d5b7f2f5b1b319695e43 Ensure that accessViolations for Survey menu items get captured. (Also ensure that you think before committing something you broke yourself :() diff -r 0a93ce6a1e8f -r df7e4291c23c app/soc/views/models/survey.py --- a/app/soc/views/models/survey.py Sun Jul 05 12:19:19 2009 +0200 +++ b/app/soc/views/models/survey.py Sun Jul 05 12:57:09 2009 +0200 @@ -852,15 +852,19 @@ # check if the current user is allowed to visit the take Survey page allowed_to_take = False - rights.checkIsSurveyTakeable( - {'key_name': survey_entity.key().name(), - 'prefix': survey_entity.prefix, - 'scope_path': survey_entity.scope_path, - 'link_id': survey_entity.link_id, - 'user': user}, - survey_logic, - check_time=False) - allowed_to_take = True + try: + rights.checkIsSurveyTakeable( + {'key_name': survey_entity.key().name(), + 'prefix': survey_entity.prefix, + 'scope_path': survey_entity.scope_path, + 'link_id': survey_entity.link_id, + 'user': user}, + survey_logic, + check_time=False) + allowed_to_take = True + except: + pass + # cache ACL for a given entity.taking_access survey_rights[survey_entity.taking_access] = allowed_to_take