Initial import
git-svn-id: http://locode01.ad.dom/svn/WEBMIP/trunk@2914 248e525c-4dfb-0310-94bc-949c084e9493
This commit is contained in:
@@ -0,0 +1,51 @@
|
||||
--application/shared_components/security/authentication/database
|
||||
prompt ......scheme 11076308724541517
|
||||
|
||||
begin
|
||||
|
||||
declare
|
||||
s1 varchar2(32767) := null;
|
||||
s2 varchar2(32767) := null;
|
||||
s3 varchar2(32767) := null;
|
||||
s4 varchar2(32767) := null;
|
||||
s5 varchar2(32767) := null;
|
||||
begin
|
||||
s1:=s1||'-DATABASE-';
|
||||
|
||||
s2 := null;
|
||||
s3 := null;
|
||||
s4 := null;
|
||||
s5 := null;
|
||||
wwv_flow_api.create_auth_setup (
|
||||
p_id=> 11076308724541517 + wwv_flow_api.g_id_offset,
|
||||
p_flow_id=> wwv_flow.g_flow_id,
|
||||
p_name=> 'DATABASE',
|
||||
p_description=>'Use database authentication (user identified by DAD).',
|
||||
p_page_sentry_function=> s1,
|
||||
p_sess_verify_function=> s2,
|
||||
p_pre_auth_process=> s3,
|
||||
p_auth_function=> s4,
|
||||
p_post_auth_process=> s5,
|
||||
p_invalid_session_page=>'',
|
||||
p_invalid_session_url=>'',
|
||||
p_cookie_name=>'',
|
||||
p_cookie_path=>'',
|
||||
p_cookie_domain=>'',
|
||||
p_ldap_host=>'',
|
||||
p_ldap_port=>'',
|
||||
p_ldap_string=>'',
|
||||
p_attribute_01=>'',
|
||||
p_attribute_02=>'',
|
||||
p_attribute_03=>'',
|
||||
p_attribute_04=>'',
|
||||
p_attribute_05=>'',
|
||||
p_attribute_06=>'',
|
||||
p_attribute_07=>'',
|
||||
p_attribute_08=>'',
|
||||
p_required_patch=>'');
|
||||
end;
|
||||
null;
|
||||
|
||||
end;
|
||||
/
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
--application/shared_components/security/authentication/database_account
|
||||
prompt ......scheme 11076426620541517
|
||||
|
||||
begin
|
||||
|
||||
declare
|
||||
s1 varchar2(32767) := null;
|
||||
s2 varchar2(32767) := null;
|
||||
s3 varchar2(32767) := null;
|
||||
s4 varchar2(32767) := null;
|
||||
s5 varchar2(32767) := null;
|
||||
begin
|
||||
s1 := null;
|
||||
s2 := null;
|
||||
s3 := null;
|
||||
s4:=s4||'return false; end;--';
|
||||
|
||||
s5 := null;
|
||||
wwv_flow_api.create_auth_setup (
|
||||
p_id=> 11076426620541517 + wwv_flow_api.g_id_offset,
|
||||
p_flow_id=> wwv_flow.g_flow_id,
|
||||
p_name=> 'DATABASE ACCOUNT',
|
||||
p_description=>'Use database account credentials.',
|
||||
p_page_sentry_function=> s1,
|
||||
p_sess_verify_function=> s2,
|
||||
p_pre_auth_process=> s3,
|
||||
p_auth_function=> s4,
|
||||
p_post_auth_process=> s5,
|
||||
p_invalid_session_page=>'101',
|
||||
p_invalid_session_url=>'',
|
||||
p_cookie_name=>'',
|
||||
p_cookie_path=>'',
|
||||
p_cookie_domain=>'',
|
||||
p_ldap_host=>'',
|
||||
p_ldap_port=>'',
|
||||
p_ldap_string=>'',
|
||||
p_attribute_01=>'',
|
||||
p_attribute_02=>'wwv_flow_custom_auth_std.logout?p_this_flow=&APP_ID.&p_next_flow_page_sess=&APP_ID.:1',
|
||||
p_attribute_03=>'',
|
||||
p_attribute_04=>'',
|
||||
p_attribute_05=>'',
|
||||
p_attribute_06=>'',
|
||||
p_attribute_07=>'',
|
||||
p_attribute_08=>'',
|
||||
p_required_patch=>'');
|
||||
end;
|
||||
null;
|
||||
|
||||
end;
|
||||
/
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
--application/shared_components/security/authentication/html_db
|
||||
prompt ......scheme 11076225554541515
|
||||
|
||||
begin
|
||||
|
||||
declare
|
||||
s1 varchar2(32767) := null;
|
||||
s2 varchar2(32767) := null;
|
||||
s3 varchar2(32767) := null;
|
||||
s4 varchar2(32767) := null;
|
||||
s5 varchar2(32767) := null;
|
||||
begin
|
||||
s1 := null;
|
||||
s2 := null;
|
||||
s3 := null;
|
||||
s4:=s4||'-BUILTIN-';
|
||||
|
||||
s5 := null;
|
||||
wwv_flow_api.create_auth_setup (
|
||||
p_id=> 11076225554541515 + wwv_flow_api.g_id_offset,
|
||||
p_flow_id=> wwv_flow.g_flow_id,
|
||||
p_name=> 'HTML DB',
|
||||
p_description=>'Use internal Application Express account credentials and login page in this application.',
|
||||
p_page_sentry_function=> s1,
|
||||
p_sess_verify_function=> s2,
|
||||
p_pre_auth_process=> s3,
|
||||
p_auth_function=> s4,
|
||||
p_post_auth_process=> s5,
|
||||
p_invalid_session_page=>'101',
|
||||
p_invalid_session_url=>'',
|
||||
p_cookie_name=>'',
|
||||
p_cookie_path=>'',
|
||||
p_cookie_domain=>'',
|
||||
p_ldap_host=>'',
|
||||
p_ldap_port=>'',
|
||||
p_ldap_string=>'',
|
||||
p_attribute_01=>'',
|
||||
p_attribute_02=>'wwv_flow_custom_auth_std.logout?p_this_flow=&APP_ID.&p_next_flow_page_sess=&APP_ID.:1',
|
||||
p_attribute_03=>'',
|
||||
p_attribute_04=>'',
|
||||
p_attribute_05=>'',
|
||||
p_attribute_06=>'',
|
||||
p_attribute_07=>'',
|
||||
p_attribute_08=>'',
|
||||
p_required_patch=>'');
|
||||
end;
|
||||
null;
|
||||
|
||||
end;
|
||||
/
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
--application/shared_components/security/authentication/mip_security
|
||||
prompt ......scheme 13718119800323842
|
||||
|
||||
begin
|
||||
|
||||
declare
|
||||
s1 varchar2(32767) := null;
|
||||
s2 varchar2(32767) := null;
|
||||
s3 varchar2(32767) := null;
|
||||
s4 varchar2(32767) := null;
|
||||
s5 varchar2(32767) := null;
|
||||
begin
|
||||
s1 := null;
|
||||
s2 := null;
|
||||
s3 := null;
|
||||
s4:=s4||'return mip_security.authenticate_user';
|
||||
|
||||
s5 := null;
|
||||
wwv_flow_api.create_auth_setup (
|
||||
p_id=> 13718119800323842 + wwv_flow_api.g_id_offset,
|
||||
p_flow_id=> wwv_flow.g_flow_id,
|
||||
p_name=> 'MIP_SECURITY',
|
||||
p_description=>'The WebMIP authentication scheme.',
|
||||
p_page_sentry_function=> s1,
|
||||
p_sess_verify_function=> s2,
|
||||
p_pre_auth_process=> s3,
|
||||
p_auth_function=> s4,
|
||||
p_post_auth_process=> s5,
|
||||
p_invalid_session_page=>'101',
|
||||
p_invalid_session_url=>'',
|
||||
p_cookie_name=>'',
|
||||
p_cookie_path=>'',
|
||||
p_cookie_domain=>'',
|
||||
p_ldap_host=>'',
|
||||
p_ldap_port=>'',
|
||||
p_ldap_string=>'',
|
||||
p_attribute_01=>'',
|
||||
p_attribute_02=>'wwv_flow_custom_auth_std.logout?p_this_flow=&FLOW_ID.&p_next_flow_page_sess =&FLOW_ID.:500',
|
||||
p_attribute_03=>'',
|
||||
p_attribute_04=>'',
|
||||
p_attribute_05=>'',
|
||||
p_attribute_06=>'',
|
||||
p_attribute_07=>'',
|
||||
p_attribute_08=>'',
|
||||
p_required_patch=>'');
|
||||
end;
|
||||
null;
|
||||
|
||||
end;
|
||||
/
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
--application/shared_components/security/authorization/check_agent_access
|
||||
wwv_flow_api.create_security_scheme(
|
||||
p_id => 16097609166220701 + wwv_flow_api.g_id_offset,
|
||||
p_flow_id => wwv_flow.g_flow_id,
|
||||
p_name=>'check agent access',
|
||||
p_scheme_type=>'FUNCTION_RETURNING_BOOLEAN',
|
||||
p_scheme=>'declare'||chr(10)||
|
||||
'cursor c_supplier(cp_enqu_id number) is SELECT prty_id FROM v_latest_rt_code_for_enro where rt_code=''ENQ SUPP'' and enqu_id=cp_enqu_id;'||chr(10)||
|
||||
'supplierid number;'||chr(10)||
|
||||
'begin'||chr(10)||
|
||||
'--copied from main authorization scheme'||chr(10)||
|
||||
'IF wwv_flow_custom_auth.current_page_is_public then'||chr(10)||
|
||||
' return TRUE;'||chr(10)||
|
||||
'else '||chr(10)||
|
||||
''||chr(10)||
|
||||
'if mip_security.page_authorization(p_app_user=>:app_user, p_page_id=>:app_page_id) then'||chr(10)||
|
||||
''||chr(10)||
|
||||
'--scheme code just for enquiry page, checks records against agent'||chr(10)||
|
||||
' if :P3_ID is null then'||chr(10)||
|
||||
' return true;'||chr(10)||
|
||||
' end if; '||chr(10)||
|
||||
' if #OWNER#.mip_parties.get_user_role(v(''APP_USER'')) = ''AGENT'' then '||chr(10)||
|
||||
' open c_supplier(:P3_ID);'||chr(10)||
|
||||
' fetch c_supplier into supplierid;'||chr(10)||
|
||||
' if c_supplier%found then'||chr(10)||
|
||||
' if #OWNER#.mip_parties.has_supplier(v(''APP_USER''), supplierid) then'||chr(10)||
|
||||
' close c_supplier;'||chr(10)||
|
||||
' return true;'||chr(10)||
|
||||
' end if;'||chr(10)||
|
||||
' else'||chr(10)||
|
||||
' close c_supplier;'||chr(10)||
|
||||
' return false;'||chr(10)||
|
||||
' end if;'||chr(10)||
|
||||
' else'||chr(10)||
|
||||
' return true;'||chr(10)||
|
||||
' end if;'||chr(10)||
|
||||
'end if;'||chr(10)||
|
||||
'END IF;'||chr(10)||
|
||||
''||chr(10)||
|
||||
'end;',
|
||||
p_caching=>'BY_USER_BY_PAGE_VIEW',
|
||||
p_error_message=>'Oi');
|
||||
|
||||
|
||||
end;
|
||||
/
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
--application/shared_components/security/authorization/master_page_authorization
|
||||
wwv_flow_api.create_security_scheme(
|
||||
p_id => 14565830986682708 + wwv_flow_api.g_id_offset,
|
||||
p_flow_id => wwv_flow.g_flow_id,
|
||||
p_name=>'master_page_authorization',
|
||||
p_scheme_type=>'FUNCTION_RETURNING_BOOLEAN',
|
||||
p_scheme=>'IF wwv_flow_custom_auth.current_page_is_public then'||chr(10)||
|
||||
'return TRUE;'||chr(10)||
|
||||
'else'||chr(10)||
|
||||
'return mip_security.page_authorization(p_app_user=>:app_user, p_page_id=>:app_page_id);'||chr(10)||
|
||||
'END IF;',
|
||||
p_caching=>'BY_USER_BY_PAGE_VIEW',
|
||||
p_error_message=>'You are not authorized to access this page');
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
--application/shared_components/security/authorization/page_authorization
|
||||
wwv_flow_api.create_security_scheme(
|
||||
p_id => 14572900838700208 + wwv_flow_api.g_id_offset,
|
||||
p_flow_id => wwv_flow.g_flow_id,
|
||||
p_name=>'PAGE_AUTHORIZATION',
|
||||
p_scheme_type=>'FUNCTION_RETURNING_BOOLEAN',
|
||||
p_scheme=>'return true;'||chr(10)||
|
||||
'IF wwv_flow_custom_auth.current_page_is_public then'||chr(10)||
|
||||
'return TRUE;'||chr(10)||
|
||||
'else'||chr(10)||
|
||||
'return mip_security.page_authorization(p_app_user=>:app_user, p_page_id=>:app_page_id);'||chr(10)||
|
||||
'END IF;',
|
||||
p_caching=>'BY_USER_BY_PAGE_VIEW',
|
||||
p_reference_id=> 14565830986682708,
|
||||
p_error_message=>'You are not authorized to access this page');
|
||||
|
||||
Reference in New Issue
Block a user