app/soc/logic/site/id_user.py
changeset 305 972d28056d9d
parent 301 5d6d106afb23
child 309 7190b224c701
equal deleted inserted replaced
304:812abb9a7e3b 305:972d28056d9d
    79   if not (id or current_id):
    79   if not (id or current_id):
    80     # no Google Account was supplied or is logged in, so an unspecified
    80     # no Google Account was supplied or is logged in, so an unspecified
    81     # User is definitely *not* a Developer
    81     # User is definitely *not* a Developer
    82     return False
    82     return False
    83 
    83 
    84   if (not id or id == current_id) and users.is_current_user_admin():
    84   if ((not id) or (id == current_id)) and users.is_current_user_admin():
    85     # no id supplied, or current logged-in user, and that user is in the
    85     # no id supplied, or current logged-in user, and that user is in the
    86     # Administration->Developers list in the App Engine console
    86     # Administration->Developers list in the App Engine console
    87     return True
    87     return True
    88 
    88 
    89   # If no id is specified, default to logged in user
       
    90   if not id:
    89   if not id:
    91     id = current_id
    90     id = current_id
    92 
    91 
    93   user = soc.logic.user_logic.getFromFields(email=id)
    92   user = soc.logic.user_logic.getFromFields(email=id)
    94 
    93