-
Aug 30th, 2012, 12:24 PM
#1
authorize role users with spring security
Hello,
I am looking for a way to manage commentt authorization rights and access to the user that all depant onscreen user's role,
in fact I use spring security jsf 2 and 3, the following is my code but when I run nothing appears or has changed:
*********************page.xhtlm******************
[]<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich"
xmlns:sec="http://www.springframework.org/security/tags">
<sec:authorize ifAnyGranted="ROLE_PARTICIPANT">
<rich:menuItem
onclick="document.location.href='Gest-utilisateur1.jsf'">
<h:outputLink value="Gest-utilisateur1.jsf">
<h:outputText value="Gestion des utilisateurs"></h:outputText>
</h:outputLink>
</rich:menuItem>
<rich:menuItem
onclick="document.location.href='GestConsult-groupe1.jsf'">
<h:outputLink value="Gest-groupe1.jsf">
<h:outputText value="Gestion des groupes"></h:outputText>
</h:outputLink>
</rich:menuItem>
</sec:authorize >
<sec:authorize access="hasRole('ROLE_ADMIN')">
<h:outputText value="XXXXXX"></h:outputText>
</sec:authorize>
[/CODE]
but nothing changes, please let me know every information that can help me and thank you
-
Aug 31st, 2012, 03:13 PM
#2
-
Sep 3rd, 2012, 05:44 AM
#3
hello,
I checked this link but still I have not solved my problem of managing access rights to application menus with Spring
Security3..
I don't know exactly what I need to add as a tag in the file, or I have to create a java class?
enyone can help me please??
-
Sep 3rd, 2012, 05:33 PM
#4
Have you ran the working examples? Did you remember to update the tag definitions? Can you expand on what you mean by nothing changes?
-
Sep 4th, 2012, 04:32 AM
#5
response
Good morning,
I mean the example that you have mentioned do not answer my question, it does not even contain the tags <security:intercept-url> I can give access through roles that I have.
I am looking for a detailed example that helps me solve my problème.In fact I am a beginner in spring security and I do not really mind,
thank you very much
-
Sep 4th, 2012, 09:51 AM
#6
I can't help you if you do not answer my questions. Your best bet is to read the documentation. If you have a specific problem, make sure you give details about what you expect to happen, what is actually happening, and what you have tried.
Last edited by Rob Winch; Sep 4th, 2012 at 10:05 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules