ITPub博客

首页 > Linux操作系统 > Linux操作系统 > user api

user api

原创 Linux操作系统 作者:blueshine07 时间:2012-04-21 10:31:42 0 删除 编辑
Applies to: 
Oracle User Management - Version: 11.5.10.2
Information in this document applies to any platform.

Goal
Q1: How to assign role to a user using APIs?

Q2: How to add a responsibility to a user using APIs?

Q3: How to revoke a responsibility assignment to a user using APIs?

Q4: How to revoke an indirect responsiblity (roles assigned using UMX) assignment to a user using APIs?


Solution
A1: Use the following API wf_local_synch.PropagateUserRole
Example:

Begin
wf_local_synch.PropagateUserRole(
     p_user_name => '&USER_NAME',
     p_role_name => '&ROLE_KEY'); 
commit; 
end;

A2: Use the following API fnd_user_resp_groups_api.Insert_Assignment

begin 
fnd_user_resp_groups_api.Insert_Assignment (
   user_id =>&USER_ID , 
   responsibility_id => &RESP_ID, 
   responsibility_application_id =>$APPL_ID , 
   start_date => &START_DATE, 
   end_date => &END_DATE, 
   description =>'Sample 
   example' ); 
commit; 
end; 

This shall raise an error if the responsibility is assigned to user. But if you need to update responsibility assignment in case of responsibility existence, you can use the following API: 

begin 
fnd_user_pkg.addresp( 
     '&User_Name', 
     '&Responsablity_Application_Short_Name', 
     '&Responsibility_Key', 
     '&Security_Group', 
     '&Description', 
     '&Start_Date', 
     '&End_Date' ); 
commit; 
end;
A3: Use the following API fnd_user_pkg.delresp
Example:

Begin 
fnd_user_pkg.delresp(          
     '&User_Name', 
      '&Responsibility_application_short_name', 
      '&Responsibility_Key', 
      '&Security_Group'); 
commit;
End;
This simply end date the responsibility assignment to a user by the current system date.

A4: Use the following API Wf_local_synch.PropagateUserRole

Begin 
Wf_local_synch.PropagateUserRole( 
       p_user_name => '&USER_NAME',
       p_role_name => '&ROLE_KEY',
       p_start_date=>'&Start_Date',
       p_expiration_date=>'&End_Date'); 
commit; 
End;
You need to end date the parent Role and it shall end date the rest Roles.

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/25103190/viewspace-721876/,如需转载,请注明出处,否则将追究法律责任。

下一篇: EBS 菜单栏的开发
请登录后发表评论 登录
全部评论

注册时间:2011-08-26

  • 博文量
    55
  • 访问量
    149545