Announcement Announcement Module
Collapse
No announcement yet.
authorize role users with spring security Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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

  • #2
    See if http://forum.springsource.org/showth...tion-and-JSF-2 helps

    Comment


    • #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??

      Comment


      • #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?

        Comment


        • #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

          Comment


          • #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, 10:05 AM.

            Comment

            Working...
            X