Friday, May 9, 2014

OIM 11gR2 - Show and Hide UI elements based on a Role

OIM 11gR2 - Show and Hide UI elements based on a Role


Problem: You want to show or hide a button or field in OIM, but you want to do it based on the users role. For example, only Admins should be able to see the "Administration" panel in OIM.



Simple :-)

Here are the steps to do this.

First, login to OIM as xelsysadm or another admin that can create sandboxes.


Now that you have the sandbox and it is active, click the "Customize" button in the upper right corner of the screen. Once this is done, you need to click on "Source".


This will open up the WebCenter composer for you. You need to then select the panel or button you're looking to hide/show. For my example, I am going to modify the "Administration" panel.



As you can see, I clicked on the entire panel so that the box was around the entire object. You can choose just one item or button if you like, but for my example, we're just doing the Administration panel. You should see the "showDetailHeader: Administration" section highlighted now.

Next, click "Edit" from the menu.


We want to change the "Visible" item. We need to click the button next to "Visible" and choose "Expression Builder".


We want to add the string:

#{oimcontext.currentUser.roles['SYSTEM ADMINISTRATORS'] != null}

This string tells us a few things, it is using the OOTB managed bean for currentUser.roles and we are supplying the 'SYSTEM ADMINISTRATORS' role. Also, it has NULL which simply means if you do not have this role... HIDE !!

Next, click Test to make sure you're EL is correct and then "OK".

Finally, go back to your sandbox and export and then Publish.

** Side note, I always export before publishing any sandbox so that just in case something goes wrong I can edit the sandbox and fix or undo what I added.

Now, logout and log back in as a normal user.


DONE!

As I mentioned before, you can show or hide anything based on any role you create. Test this out and let me know what you find. I'm using OIM 11gR2 PS1.





Thursday, May 8, 2014

Introduction

I'd like to start by introducing myself. My name is Eric Whited and I specialize in Oracle Identity and Access Management. OID, ODSEE, OVD, OIM, OAM, OUD, (and others)... are the acronyms of my life. I work as a consultant for an Oracle partner and have really enjoyed the last several years. I have several real world deliveries which have all had their ups and downs.

If you're reading this, you are searching for something that may or may not exist in the real world regarding custom solutions and best practices. I have successfully implemented several IAM solutions for a wide variety of clients. Public and private clients, who have leveraged the Oracle IAM suite and both public and private clients provide a variety of challenges.

Conclusion

In this blog, I want to explore several topics. I want to show examples of custom solutions that have helped clients go above and beyond and I want to talk openly with YOU about other key solutions and best practices. I will be uploading certain "how-to" guides and also, from time-to-time, dive deeper into theory and confusing topics. I have reached a point in my career where being an individual contributor and living in "my" world is not enough. It's time to explore other's views and help teach each other the nuances of security, and not just "Oracle Security". However, most of my blogs will showcase Oracle products, as that is what I am currently focusing on these days.

Thanks,
Eric Whited