Vai al contenuto

# F_USER_IN_ROLE

## Codice Sorgente

```sql FUNCTION F_USER_IN_ROLE ( P_USER IN VARCHAR2 , P_ROLE IN VARCHAR2 ) RETURN NUMBER AS v_has_role number := 0; BEGIN select count(column_value) into v_has_role from tb_config, table(split(strvalue, ':')) where upper(name) = upper(P_ROLE) and upper(column_value) = upper(P_USER);

    return case when v_has_role > 0 then 1 else 0 end;

END F_USER_IN_ROLE;```