Updated the docstrings for GHOP access methods.
authorMadhusudan.C.S <madhusudancs@gmail.com>
Sun, 30 Aug 2009 17:50:54 +0530
changeset 2841 2289f97d6216
parent 2840 41f7938a35b0
child 2842 d54ef6eaedc8
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.
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