# HG changeset patch # User Madhusudan.C.S # Date 1251634854 -19800 # Node ID 2289f97d62165811c5098868e04c6dc0050c1877 # Parent 41f7938a35b0b6c72398ae246978342a6e0d5176 Updated the docstrings for GHOP access methods. The checkRoleAndStatusForTask and checkStatusForTask methods' docstrings tell more on what they specifically do and why they both exist separately. diff -r 41f7938a35b0 -r 2289f97d6216 app/soc/modules/ghop/views/helper/access.py --- a/app/soc/modules/ghop/views/helper/access.py Sun Aug 30 13:56:21 2009 +0200 +++ b/app/soc/modules/ghop/views/helper/access.py Sun Aug 30 17:50:54 2009 +0530 @@ -137,6 +137,9 @@ role_status, task_status): """Checks if the current user has access to the given task. + This method checks if the current user is in one of the allowed_roles + and has specified role_status, If yes, allows him to access the Task page. + Args: django_args: a dictionary with django's arguments allowed_roles: list with names for the roles allowed to pass access check @@ -198,6 +201,12 @@ def checkStatusForTask(self, django_args): """Checks if the current user has access to the given task. + This method checks if the current user is either an GHOP Org Admin or a + Mentor and is active, if yes it allows them to view the task page at any + task state. If the user is none of the above, it checks the status of the + task, and if it is in one of the valid published states it allows access + to view the task page. + Args: django_args: a dictionary with django's arguments