【发布时间】:2020-08-05 00:14:48
【问题描述】:
绑定变量 :app_region_id 适用于区域,但不适用于授权方案
区域 SQL 语句
SELECT WORKSPACE,APPLICATION_ID , PAGE_ID, REGION_ID, REGION_NAME,AUTHORIZATION_SCHEME, :app_region_id
from apex_application_page_regions
where region_id = :app_region_id
授权方案
方案类型:存在 SQL 查询
SQL 查询:
Select 1
from apex_application_page_regions
where region_id = :app_region_id;
我应该使用哪个绑定变量来实现区域授权。我想实现的代码,它没有返回想要的结果
Select 1
from AD_GRP_APEX_REGION_ASSOC r,
AD_GRP_EMP e
where e.ad_grp = r.ad_grp
and e.user_id = :app_user
and r.region_id = :app_region_id
【问题讨论】:
-
您能否描述一下您要完成的工作。期望的结果是什么。
-
您想将 user_id 与 :app_user 进行比较吗?我不明白要求...当您的查询返回数据时,授权方案将起作用。
-
实际的授权查询将是 Select 1 from AD_GRP_APEX_REGION_ASSOC r, AD_GRP_EMP e where e.ad_grp = r.ad_grp and e.user_id = :app_user and r.region_id = nv('app_region_id') ;
-
AD_GRP_APEX_REGION_ASSOC 包含 region_id 和将访问该区域的活动目录组。 AD_GRP_EMP 包含活动目录组和与该组关联的用户 ID
标签: oracle-apex oracle-apex-5.1 oracle-apex-19.1 oracle-apex-18.2