How to Assign and Revoke Role or Responsibility to a User Using a Standard API

3
How to Assign and Revoke Role/Responsibility to a User using a Standard API? (Doc ID 373369.1) Modified: 24-Nov-2012 Type: HOWTO In this Document APPLIES TO: Oracle User Management - Version 11.5.10.2 to 11.5.10.2 [Release 11.5] Information in this document applies to any platform. ***Checked for relevance on 23-Nov-2012*** GOAL Using a Standard API to Assign and Revoke Role/Responsibilities to a User FIX 1. Assign role to a user using an API To assign role to a user using APIs, use the following API wf_local_synch.PropagateUserRole. Example: 2. Add a responsibility to a user using API fnd_user_resp_groups_api.Insert_Assignment To add a responsibility to a user using and API, use the following API fnd_user_resp_groups_api.Insert_Assignment: Example: Goal Using a Standard API to Assign and Revoke Role/Responsibilities to a User Fix 1. Assign role to a user using an API 2. Add a responsibility to a user using API fnd_user_resp_groups_api.Insert_Assignment 3. Revoke a responsibility assignment to a user using fnd_user_pkg.delresp 4. Revoke an Indirect Responsibility Diagnostics and Utilities Community References Begin wf_local_synch.PropagateUserRole( p_user_name => '&USER_NAME', p_role_name => '&ROLE_KEY'); commit; end; Page 1 of 3 Document Display 24/1/2014 https://support.oracle.com/epmos/faces/SearchDocDisplay?_adf.ctrl-state=4437m051m...

description

How to Assign and Revoke Role or Responsibility to a User using a Standard API

Transcript of How to Assign and Revoke Role or Responsibility to a User Using a Standard API

  • How to Assign and Revoke Role/Responsibility to a User using a Standard API? (Doc ID 373369.1)

    Modified: 24-Nov-2012 Type: HOWTO

    In this Document

    APPLIES TO:

    Oracle User Management - Version 11.5.10.2 to 11.5.10.2 [Release 11.5]

    Information in this document applies to any platform. ***Checked for relevance on 23-Nov-2012***

    GOAL

    Using a Standard API to Assign and Revoke Role/Responsibilities to a User

    FIX

    1. Assign role to a user using an API

    To assign role to a user using APIs, use the following API wf_local_synch.PropagateUserRole.

    Example:

    2. Add a responsibility to a user using API fnd_user_resp_groups_api.Insert_Assignment

    To add a responsibility to a user using and API, use the following API fnd_user_resp_groups_api.Insert_Assignment:

    Example:

    Goal

    Using a Standard API to Assign and Revoke Role/Responsibilities to a User

    Fix

    1. Assign role to a user using an API

    2. Add a responsibility to a user using API fnd_user_resp_groups_api.Insert_Assignment

    3. Revoke a responsibility assignment to a user using fnd_user_pkg.delresp

    4. Revoke an Indirect Responsibility

    Diagnostics and Utilities Community

    References

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

    Page 1 of 3Document Display

    24/1/2014https://support.oracle.com/epmos/faces/SearchDocDisplay?_adf.ctrl-state=4437m051m...

  • This shall raise an error if the responsibility is assigned to a user, but if needed to update the responsibility assignment in case of responsibility existence, use the following API:

    3. Revoke a responsibility assignment to a user using fnd_user_pkg.delresp

    To revoke a responsibility assignment to a user using an API, use fnd_user_pkg.delresp.

    Example:

    This simply end date the responsibility assignment to a user by the current system date.

    4. Revoke an Indirect Responsibility

    To revoke an indirect responsiblity (roles assigned using UMX) assignment to a user using APIs, use the following API Wf_local_synch.PropagateUserRole.

    Example:

    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;

    begin fnd_user_pkg.addresp( '&User_Name', '&Responsablity_Application_Short_Name', '&Responsibility_Key', '&Security_Group', '&Description', '&Start_Date', '&End_Date' ); commit; end;

    Begin fnd_user_pkg.delresp( '&User_Name', '&Responsibility_application_short_name', '&Responsibility_Key', '&Security_Group'); commit; End;

    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;

    Page 2 of 3Document Display

    24/1/2014https://support.oracle.com/epmos/faces/SearchDocDisplay?_adf.ctrl-state=4437m051m...

  • End date the parent Role and it shall end date the remaining Roles.

    Diagnostics and Utilities Community

    Diagnostics

    For the latest diagnostics, please reference Document 421245.1 E-Business Suite Diagnostics References for R12.

    Utilities Community Visit the Utilities community for help from industry experts or to share knowledge.

    REFERENCES

    Page 3 of 3Document Display

    24/1/2014https://support.oracle.com/epmos/faces/SearchDocDisplay?_adf.ctrl-state=4437m051m...