There is very handy feature available in ADF 12c - option to display predefined information, if current user is not authorized to view given region. Predefined information comes from dedicated ADF Task Flow with JSF fragment containing user friendly message.
In my example, there is one task flow configured to be rendered only for users assigned with finance-role:
Test user redsam is not assigned with finance-role, this is done for test purpose - to see how unauthorized region will be rendered:
As I mentioned earlier, there is one dedicated task flow created to be rendered instead of blank screen, when original task flow is not authorized to be rendered - unauthorized-flow:
Keep in mind - such task flow must be granted with anonymous or authenticated access to be accessible for anyone in the system.
JSF fragment from dedicated task flow contains simple text in this example, you may create something more fancy:
The key thing - configure dedicated ADF task flow to be considered by ADF runtime as the one to be rendered when original one is not accessible. This is done in adf-config.xml file. Under Controller section, make sure to point Unauthorized Region Taskflow to point to the ADF task flow definition:
On runtime, we can login with redsam user:
First region with departments data is rendered, second region is not authorized to be displayed - dedicated ADF region is rendered instead with text - Task flow access is denied:
Page is implemented with Panel Dashboard, two regions are located next to each other:
Download sample application - ADFSecurityTF12cApp.zip.
In my example, there is one task flow configured to be rendered only for users assigned with finance-role:
Test user redsam is not assigned with finance-role, this is done for test purpose - to see how unauthorized region will be rendered:
As I mentioned earlier, there is one dedicated task flow created to be rendered instead of blank screen, when original task flow is not authorized to be rendered - unauthorized-flow:
Keep in mind - such task flow must be granted with anonymous or authenticated access to be accessible for anyone in the system.
JSF fragment from dedicated task flow contains simple text in this example, you may create something more fancy:
The key thing - configure dedicated ADF task flow to be considered by ADF runtime as the one to be rendered when original one is not accessible. This is done in adf-config.xml file. Under Controller section, make sure to point Unauthorized Region Taskflow to point to the ADF task flow definition:
On runtime, we can login with redsam user:
First region with departments data is rendered, second region is not authorized to be displayed - dedicated ADF region is rendered instead with text - Task flow access is denied:
Page is implemented with Panel Dashboard, two regions are located next to each other:
Download sample application - ADFSecurityTF12cApp.zip.