Results 1 to 2 of 2

Thread: <sec:authorize url> tag cant hide in spring secuiry (please give me a real demo)

Hybrid View

  1. #1
    Join Date
    Oct 2011
    Posts
    1

    Default <sec:authorize url> tag cant hide in spring secuiry (please give me a real demo)

    hi all ,

    when I use the spring security 3.1rc2,I find a problem need to help

    I custom the AcessDecisonManager, FilterSecurityInterceptor , InvocationSecurityMetadataSource,UserDetailsServic e and put the user,role and resource url in database and use the <sec:authorize url> tag in UI as bellow:

    <sec:authorize url="/admin.jsp">
    <a href="admin.jsp">enter the admin</a>
    </sec:authorize>

    when I login in with user who not has the authority of access,I find the admin.jsp link not hidden ,it still show in the UI,click the admin.jsp link ,access denied ( which means the authority work well) .

    but I want to know how can I do to make the admin.jsp link hidden when the user has not the authority of accessing the link? if I config the role in security.xml ,and login in with user who not has the authority of access, the <sec:authorize url> hide automatically.

    please give me a detail solution .

  2. #2
    Luke Taylor is offline Senior Member Acegi Security System TeamSpring Team
    Join Date
    Aug 2004
    Location
    Glasgow, Scotland
    Posts
    3,449

    Default

    Look at the tutorial sample. It is used there.
    Spring - by Pivotal
    twitter @tekul

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •