Friday, February 6, 2015

How to hide Administration Tab in OIM Admin console from End Users (Role Base UI Access)

Below are the steps for hiding Administration Tab in OIM Admin console

1) Login to Identity console and create a sandbox


2) Click on Customize,Click on View than select Source
3) If prompted of warning about customization say Edit
4) From bottom panel scroll down to Administration.
5) click on Administration , Make sure complete Administration box is selected.
6) Click on Edit at top panel. it will open up a POP up window.


7) Go at the bottom of the page and select Show Component



8) At Type a Value or expression remove true and put below EL expression  and click on test it should show true then click on OK
#{oimcontext.currentUser.roles['SYSTEM ADMINISTRATORS'] != null}


9)  Click on apply then OK


10) Publish the active sandox to make the changes available

 
11) Before making EL changes as end user(testuser5)  


    After making EL changes as end user(testuser5)
    As a xelsysadm user

Below are some other options that you can use as per your requirement.

To show a UI component if the logged-in user has the System Administrators admin role:
#{oimcontext.currentUser.roles['SYSTEM ADMINISTRATORS'] != null}

Multipal condition
#{(oimcontext.currentUser.roles['SYSTEM ADMINISTRATORS'] != null) || oimcontext.currentUser.roles['HelpDesk'] != null}

To show a UI component if the user's UDF attribute called UDF_NAME equals to UDF_VALUE:
#{oimcontext.currentUser['UDF_NAME'] == 'UDF_VALUE'}

Similarly, the EL expression can be modified to check if the logged-in user has any other admin role.
To show a UI component if the usr_key attribute of the logged-in user is 1:
#{oimcontext.currentUser['usr_key'] == 1}

To show a UI component if the logged-in user belongs to the Xellerate Users organization:
#{oimcontext.currentUser['Organization Name'] == 'Xellerate Users'}

To show a UI component if the logged-in user's last name is Smith:
#{oimcontext.currentUser['Last Name'] == 'Smith'}

Thank you
Arihant Baid