#NEWLINE# def is_user_reseller_admin( self , req , account , user ) : #NEWLINE# #INDENT# "Returns True if the user is a .reseller_admin.\n\n        :param account: account user is part of\n        :param user: the user\n        :returns: True if user .reseller_admin, False\n                  if user is not a reseller_admin and None if the user\n                  doesn't exist.\n        " #NEWLINE# req . credentials_valid = True #NEWLINE# user_json = self . get_user_detail ( req , account , user ) #NEWLINE# if ( user_json is None ) : #NEWLINE# #INDENT# req . credentials_valid = False #NEWLINE# return False #NEWLINE# #UNINDENT# user_detail = json . loads ( user_json ) #NEWLINE# return ( '.reseller_admin' in ( g [ 'name' ] for g in account [ 'groups' ] ) )