排除主页的授权 - Oracle Apex
Authorization to exclude Home Page - Oracle Apex
我有一个授权方案应用于 returns
的应用程序的属性
RETURN MYFUNCTION(:APP_USER, :APP_PAGE_ID);
问题是,当主页 ID 不是 return 时,它不会让用户登录。如何将scheme应用于除首页以外的应用?
我正在使用 Apex 19.1
我不确定我是否理解正确,但是 - myfunction
应该被创建以便它接受两个参数,并且它们的名称必须是 p_username
和 p_password
.它应该是 return 布尔值:
true
如果凭据正常并且您被允许连接
false
,如果相反
看来你的函数returns 主页ID;那是对的吗?如果是这样,好吧,我只是告诉你该怎么做。如果不是,请解释一下
是什么意思
when the home page ID doesn't return
和
how can I apply the scheme (...) excluding home page
我想你的函数看起来像这样,为你手头的问题添加了一个 if 语句。
begin
-- exclusions for this page check
if p_page_id in (
101 -- login page
,1 -- home page
) then
return true;
end if;
-- does user have access to the page provided?
select count(*)
into l_exists
from dual
where exists
(select null
from sec_table
where page_id = p_page_id
and username = p_app_user
);
return l_exists = 1;
end;
我有一个授权方案应用于 returns
的应用程序的属性RETURN MYFUNCTION(:APP_USER, :APP_PAGE_ID);
问题是,当主页 ID 不是 return 时,它不会让用户登录。如何将scheme应用于除首页以外的应用?
我正在使用 Apex 19.1
我不确定我是否理解正确,但是 - myfunction
应该被创建以便它接受两个参数,并且它们的名称必须是 p_username
和 p_password
.它应该是 return 布尔值:
true
如果凭据正常并且您被允许连接false
,如果相反
看来你的函数returns 主页ID;那是对的吗?如果是这样,好吧,我只是告诉你该怎么做。如果不是,请解释一下
是什么意思when the home page ID doesn't return
和
how can I apply the scheme (...) excluding home page
我想你的函数看起来像这样,为你手头的问题添加了一个 if 语句。
begin
-- exclusions for this page check
if p_page_id in (
101 -- login page
,1 -- home page
) then
return true;
end if;
-- does user have access to the page provided?
select count(*)
into l_exists
from dual
where exists
(select null
from sec_table
where page_id = p_page_id
and username = p_app_user
);
return l_exists = 1;
end;