改动之处
return is_have_permission_wxx(V('WXX_USER_ID'), 2,V('WXX_ROLE_ID'));
改之后
return is_have_permission_wxx(V('USER_ID'), 2,V('ROLE_ID'));
创建新的动态菜单“动态菜单1”
共享组件→列表→创建→动态
selectlevel,m1.NAME label,'f?p=&'||'APP_ID.:'||m1.PAGE_ID||':&'||'SESSION.::&'||'DEBUG.::::' target,null IS_CURRENT
from PERM_TEST_WXX2 m1
where m1.APP_ID = V('APP_CODE') and m1.IS_ENABLE = 0 and PERM_ID in (select m2.PERM_ID as PERM_ID from ROLE_PERM_TEST_WXX rma1join PERM_TEST_WXX2 m2on rma1.PERM_ID = m2.PERM_IDwhere rma1.ROLE_ID = :ROLEID and m2.PERM_ID is not nullunionselect rma2.PERM_ID from ROLE_PERM_TEST_WXX rma2 where rma2.ROLE_ID = :ROLEID)
start with m1.PARENT_ID is null
connect by prior m1.PAGE_ID = m1.PERM_ID
order siblings by m1.UPDATE_DATE;
结果一运行直接不不显示主页以外的其他界面
也许是我配置的问题
没加限制之前
加上限制条件反而显示得更少了
#############################################################
前情提要
APEX内置验证与授权管理_王小小鸭的博客-CSDN博客https://blog.csdn.net/clover_oreo/article/details/132429705?csdn_share_tail=%7B%22type%22%3A%22blog%22%2C%22rType%22%3A%22article%22%2C%22rId%22%3A%22132429705%22%2C%22source%22%3A%22clover_oreo%22%7D
→真正的解决
列表CKU_MENU_WXX存档
select * from ck_menu_v
where page_id in (select distinct page_id from SYS_USER_ROLE_PAGE_WXX_V where user_name = :APP_USER
)
回去查看内容
刚刚去查了,一个用户对应一个角色,一个角色有多个权限页面
select USER_ID,USER_NAME,ROLE_ID,ROLE_NAME,PERM_ID,PERM_NAME,APP_ID,PAGE_ID
from test_user_wxx_v
order by USER_NAME;
试着改一下
动态菜单列表CKU_MENU_WXX2
select * from ck_menu_v
where page_id in (select distinct page_id from test_user_wxx_v where user_name = :APP_USER
)
配置一下
用户界面→导航菜单→导航菜单列表 刚刚写好的CKU_MENU_WXX2→模板选项如下所示
成功啦!