Accessing the application's security information
You can access the application's security information at the ViewController layer either through Java code in a managed bean or through Expression Language (EL) in your JSF pages by utilizing the methods available via the oracle.adf.share.security.SecurityContext
bean. These methods will allow you to determine whether authorization and/or authentication are enabled in your application, the roles assigned to the authenticated user, whether the user is assigned a specific role, and so on. At the ADF-BC level, security information can be accessed through the methods available in the oracle.jbo.Session
.
In this recipe, we will see how to access the application's security information from a managed bean, a JSF page and at the ADF-BC level.
Getting ready
You will need to create a skeleton Fusion Web Application (ADF) workspace before you proceed with this recipe. For this purpose, we will use the MainApplication
workspace that was developed in Breaking...