app/soc/logic/site/id_user.py
changeset 164 afdf502c6cc4
parent 141 e120c24b89e2
child 166 4d2cbd0ea977
equal deleted inserted replaced
163:1f67538ff619 164:afdf502c6cc4
   134     return True
   134     return True
   135   else:
   135   else:
   136     return False
   136     return False
   137     
   137     
   138 def isIdUser(id=None):
   138 def isIdUser(id=None):
   139   """Returns True if Google Account has it's soc.models.user.User entity in datastore.
   139   """Returns True if a Google Account has it's soc.models.user.User entity in datastore.
   140 
   140 
   141   Args:
   141   Args:
   142     id: a Google Account (users.User) object; if id is not supplied,
   142     id: a Google Account (users.User) object; if id is not supplied,
   143       the current logged-in user is checked
   143       the current logged-in user is checked
   144   """
   144   """
   155     return False
   155     return False
   156   
   156   
   157   return True
   157   return True
   158 
   158 
   159 def isIdDeveloper(id=None):
   159 def isIdDeveloper(id=None):
   160   """Returns True if Google Account is a Developer with special privileges.
   160   """Returns True if a Google Account is a Developer with special privileges.
   161   
   161   
   162   Since it only works on the current logged-in user, if id matches the
   162   Since it only works on the current logged-in user, if id matches the
   163   current logged-in Google Account, the App Engine Users API function
   163   current logged-in Google Account, the App Engine Users API function
   164   user.is_current_user_admin() is checked.  If that returns False, or
   164   user.is_current_user_admin() is checked.  If that returns False, or
   165   id is not the currently logged-in user, the is_developer property of
   165   id is not the currently logged-in user, the is_developer property of