--- a/app/soc/views/helper/access.py Thu Oct 29 22:58:06 2009 +0100
+++ b/app/soc/views/helper/access.py Fri Oct 30 01:23:37 2009 +0100
@@ -983,13 +983,18 @@
@allowDeveloper
@denySidebar
- def checkIsHostForProgram(self, django_args):
+ def checkIsHostForProgram(self, django_args, logic):
"""Checks if the user is a host for the specified program.
Args:
django_args: a dictionary with django's arguments
+ logic: the logic used to look up for program entity; if not specified
+ standard program_logic will be used
"""
+ if not logic:
+ logic = program_logic
+
program = program_logic.getFromKeyFields(django_args)
if not program or program.status == 'invalid':