""" check whether the role which allows action name_action on arguments
exists (different from SUPERADMINROLE)
action_name - name of the action
arguments - arguments for authorization"""
# first check if an action exists with this name
id_action=acc_get_action_id(name_action)
arole=run_sql("SELECT id_accROLE FROM accROLE_accACTION_accARGUMENT WHERE id_accACTION=%s AND argumentlistid <= 0 LIMIT 1",(id_action,),1,run_on_slave=True)
ifarole:
returnTrue
other_roles_to_check=run_sql("SELECT id_accROLE, keyword, value, argumentlistid FROM accROLE_accACTION_accARGUMENT JOIN accARGUMENT ON id_accARGUMENT=id WHERE id_accACTION=%s AND argumentlistid > 0",(id_action,),run_on_slave=True)