app/soc/modules/ghop/views/helper/access.py
changeset 2841 2289f97d6216
parent 2840 41f7938a35b0
child 2922 6e373954bbf6
--- 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