184: guid raw(16);
185: provStatus varchar2(1000);
186: l_result pls_integer;
187: begin
188: ldap := fnd_ldap_util.c_get_oid_session(flag);
189: r.guid := fnd_ldap_util.get_guid_for_dn(ldap,r.dn);
190: if (r.guid is null) then raise no_data_found; end if;
191: appdn := fnd_ldap_util.get_orclappname;
192: appguid :=fnd_ldap_util.get_guid_for_dn(ldap,appdn);
185: provStatus varchar2(1000);
186: l_result pls_integer;
187: begin
188: ldap := fnd_ldap_util.c_get_oid_session(flag);
189: r.guid := fnd_ldap_util.get_guid_for_dn(ldap,r.dn);
190: if (r.guid is null) then raise no_data_found; end if;
191: appdn := fnd_ldap_util.get_orclappname;
192: appguid :=fnd_ldap_util.get_guid_for_dn(ldap,appdn);
193: provProfileDn := 'orclODIPProfileName='|| r.guid||'_'||appguid||',cn=Provisioning Profiles, cn=Changelog Subscriber, cn=Oracle Internet Directory';
187: begin
188: ldap := fnd_ldap_util.c_get_oid_session(flag);
189: r.guid := fnd_ldap_util.get_guid_for_dn(ldap,r.dn);
190: if (r.guid is null) then raise no_data_found; end if;
191: appdn := fnd_ldap_util.get_orclappname;
192: appguid :=fnd_ldap_util.get_guid_for_dn(ldap,appdn);
193: provProfileDn := 'orclODIPProfileName='|| r.guid||'_'||appguid||',cn=Provisioning Profiles, cn=Changelog Subscriber, cn=Oracle Internet Directory';
194: -- does the provisioning profile exists
195: provStatus := getAttribute(ldap,provProfileDn,'orclStatus','objectclass=orclODIPProvisioningIntegrationProfileV2');
188: ldap := fnd_ldap_util.c_get_oid_session(flag);
189: r.guid := fnd_ldap_util.get_guid_for_dn(ldap,r.dn);
190: if (r.guid is null) then raise no_data_found; end if;
191: appdn := fnd_ldap_util.get_orclappname;
192: appguid :=fnd_ldap_util.get_guid_for_dn(ldap,appdn);
193: provProfileDn := 'orclODIPProfileName='|| r.guid||'_'||appguid||',cn=Provisioning Profiles, cn=Changelog Subscriber, cn=Oracle Internet Directory';
194: -- does the provisioning profile exists
195: provStatus := getAttribute(ldap,provProfileDn,'orclStatus','objectclass=orclODIPProvisioningIntegrationProfileV2');
196: if (provStatus is null or provStatus<>'ENABLED')
214: else
215: r.appsToOiD := parse_ops(ldap, 'cn=ApplicationToOID,'||provProfileDn, 'orclodipprovisioningeventpermittedoperations');
216: end if;
217: end if;
218: fnd_ldap_util.c_unbind(ldap,flag);
219: r.loaded := true;
220: end load_realm;
221:
222: /*
344: END CASE;
345:
346: END if;
347:
348: if res then return fnd_ldap_util.G_SUCCESS;
349: else return fnd_ldap_util.G_FAILURE;
350: end if;
351:
352: END check_operation;
345:
346: END if;
347:
348: if res then return fnd_ldap_util.G_SUCCESS;
349: else return fnd_ldap_util.G_FAILURE;
350: end if;
351:
352: END check_operation;
353: --
358: i pls_integer;
359: j pls_integer;
360: s varchar2(2000);
361: begin
362: if at_list is null then return fnd_ldap_util.G_FAILURE;end if;
363: if at_list='*' then return fnd_ldap_util.G_SUCCESS;end if;
364: i:= 1;
365: j:= instr(atr,',');
366: if (j=0) then
359: j pls_integer;
360: s varchar2(2000);
361: begin
362: if at_list is null then return fnd_ldap_util.G_FAILURE;end if;
363: if at_list='*' then return fnd_ldap_util.G_SUCCESS;end if;
364: i:= 1;
365: j:= instr(atr,',');
366: if (j=0) then
367: if instr(at_list,atr)>0 then return fnd_ldap_util.G_SUCCESS;
363: if at_list='*' then return fnd_ldap_util.G_SUCCESS;end if;
364: i:= 1;
365: j:= instr(atr,',');
366: if (j=0) then
367: if instr(at_list,atr)>0 then return fnd_ldap_util.G_SUCCESS;
368: else return fnd_ldap_util.G_FAILURE;
369: end if;
370: else
371: s := substr(atr,i,j-i);
364: i:= 1;
365: j:= instr(atr,',');
366: if (j=0) then
367: if instr(at_list,atr)>0 then return fnd_ldap_util.G_SUCCESS;
368: else return fnd_ldap_util.G_FAILURE;
369: end if;
370: else
371: s := substr(atr,i,j-i);
372: loop
369: end if;
370: else
371: s := substr(atr,i,j-i);
372: loop
373: if (instr(at_list,','||s||',')=0) then return fnd_ldap_util.G_FAILURE;
374: end if;
375: exit when j =0;
376: i:=j+1;
377: j:=instr(atr,',',i);
379: else s := substr(atr,i,j-i);
380: end if;
381: end loop;
382: end if;
383: return fnd_ldap_util.G_SUCCESS;
384: END is_in_list;
385: --
386: -------------------------------------------------------------------------------
387: procedure is_operation_allowed(p_operation in pls_integer,
447: l_realm_dn varchar2(4000);
448: l_index pls_integer;
449: l_allowed permited_operation;
450: begin
451: x_fnd_user :=fnd_ldap_util.G_SUCCESS;
452: x_oid := fnd_ldap_util.G_FAILURE;
453: l_module_source := G_MODULE_SOURCE || 'is_operation_allowed: ';
454: if (fnd_log.LEVEL_PROCEDURE >= fnd_log.G_CURRENT_RUNTIME_LEVEL)
455: then
448: l_index pls_integer;
449: l_allowed permited_operation;
450: begin
451: x_fnd_user :=fnd_ldap_util.G_SUCCESS;
452: x_oid := fnd_ldap_util.G_FAILURE;
453: l_module_source := G_MODULE_SOURCE || 'is_operation_allowed: ';
454: if (fnd_log.LEVEL_PROCEDURE >= fnd_log.G_CURRENT_RUNTIME_LEVEL)
455: then
456: fnd_log.string(fnd_log.LEVEL_PROCEDURE, l_module_source, 'Begin');
478: end if;
479: raise case_not_found;
480: END CASE;
481: if (NOT l_allowed.enabled) then
482: x_oid := fnd_ldap_util.G_FAILURE;
483: else
484: if(p_entity = fnd_ldap_wrapper.G_IDENTITY) THEN
485: CASE p_operation
486: WHEN fnd_ldap_wrapper.G_ADD THEN l_list := l_allowed.identity_add;