adminfaces / admin-template

JSF responsive admin template based on Bootstrap and AdminLTE
https://adminfaces.github.io/docs/latest/#admin_template
MIT License
210 stars 101 forks source link

Redirect user to 403 on AccessLocalException #124

Closed rmpestano closed 6 years ago

rmpestano commented 6 years ago
Issue Overview

@RolesAllowed annotation triggers a javax.ejb.AccessLocalException when the a user doesn't have security role configured on the annotation.

User must be redirected to 403 error page in this situation.

OBS: To make it work with current AdminFaces version (RC18) one can declare the error page on its web.xml as below:

 <error-page>
        <exception-type>javax.ejb.AccessLocalException</exception-type>
        <location>/403.xhtml</location>
    </error-page> 
Additional Information