Hide screen options if user is not allowed

3

I'm having a difficulty in a web application I'm creating here, I'm using spring security to do access control, session and login, with backend java with restful and frontend with primefaces . I would like to know if you have Hide options that the user is not allowed to access.

Currently I intercept the url and if you do not have permission I call another screen that warns this impediment asking him to return to the home. He wanted these options not to appear to him.

    
asked by anonymous 28.04.2016 / 15:56

2 answers

2

You can use the facelet tags from the Spring security namespace to conditionally render JSF components (including those of Primefaces), as per the current user's authorization.

The namespace is link . Let's say it's mapped to sec , an example code would be this:

<sec:authorize ifAllGranted="USUARIO_BACANA">
    declare aqui os componentes para o usuário bacana.
</sec:authorize>

More information: link

    
28.04.2016 / 17:09
0

I got the solution, thanks to everyone who helped and guided me the solution

link

Following the solution of this user, all right

    
01.05.2016 / 05:55