user api

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/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/25103190/viewspace-721876/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值