def is_exp_summary_editable(exp_summary, user_id=None):
 return ((user_id is not None) and ((user_id in exp_summary.editor_ids) or (user_id in exp_summary.owner_ids) or exp_summary.community_owned))

def is_exp_summary_editable ( exp_summary , user_id = None ) : return ( ( user_id is not None ) and ( ( user_id in exp_summary . editor_ids ) or ( user_id in exp_summary . owner_ids ) or exp_summary . community_owned ) )
checks if a given user may edit an exploration by checking the given domain object .