extracted objects
This commit is contained in:
20
docs/functions/F_USER_IN_ROLE.md
Normal file
20
docs/functions/F_USER_IN_ROLE.md
Normal file
@@ -0,0 +1,20 @@
|
||||
# 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;```
|
||||
Reference in New Issue
Block a user