FND Role Hierarchy

Description

Categories
Enginatics
Repository
GitHub
User Management (UMX) role hierarchy to manage role-based access control (RBAC).
When run for a specified role, the report shows all hierarchies that contain or lead to inheriting that role.

SQL 24 lines

Parameters 2

ParameterTypeList of values SQL
Role NameLOV
x.role in (
select
y.role
from
(
select urcv.category_lookup_code, null parent_role, urcv.wf_role_name role from umx_role_categories_v urcv union all
select null category_lookup_code, wrh.sub_name parent_role, wrh.super_name role from wf_role_hierarchies wrh where wrh.enabled_flag='Y'
) y
where
y.parent_role is null
connect by
prior y.parent_role=y.role
start with
y.role in (
select
wlr.name
from
wf_local_roles wlr,
wf_local_roles_tl wlrt,
fnd_responsibility_vl frv
where
decode(wlr.orig_system,'FND_RESP',frv.responsibility_name,nvl(wlrt.display_name,wlr.display_name))=:role_name and
wlr.orig_system in ('UMX','FND_RESP') and
wlr.name=wlrt.name(+) and
wlr.orig_system=wlrt.orig_system(+) and
wlr.orig_system_id=wlrt.orig_system_id(+) and
wlrt.language(+)=userenv('lang') and
wlr.partition_id=wlrt.partition_id(+) and
wlr.orig_system_id=frv.responsibility_id(+)
)
)
Role CodeLOV
x.role in (
select
y.role
from
(
select urcv.category_lookup_code, null parent_role, urcv.wf_role_name role from umx_role_categories_v urcv union all
select null category_lookup_code, wrh.sub_name parent_role, wrh.super_name role from wf_role_hierarchies wrh where wrh.enabled_flag='Y'
) y
where
y.parent_role is null
connect by
prior y.parent_role=y.role
start with
y.role=:role_code
)