Results 1 to 4 of 4

Thread: Don't want to use intercept-url in xml, but want to load it from Database

  1. #1

    Question Don't want to use intercept-url in xml, but want to load it from Database

    Greetings,

    How to replace intercept-url from static XML configuration to Database based intercept-url configuration? Features should be same.. but instead of loading all intercept-url definitions from XML, it should be loaded from database table.. [i,e, Table:URL_ACCESS Columns:ID, URL_PATTERN, ACCESS RIGHT]

    Why i want that??
    Because I need a UI where Screen vs. Authorities (Roles) matrix table (with check-boxes) can be made for a UserGroup.. and Menu generation where user has visibility of accessible links only...

    I am using Spring Security 2.0.4..

    Cheers..

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

    Default

    Please read the FAQ at

    http://static.springsource.org/sprin...c-url-metadata

    (the information is for Spring 3, but is essentially the same) and search the forum, as this has been raised before.
    Spring - by Pivotal
    twitter @tekul

  3. #3

    Red face Thanks Luke, It helped.. but having one more doubt.

    Thanks luke,
    For your reply and replying very quickly..

    search the forum, as this has been raised before.
    I searched the forum.. almost went through 50+ post, but unable to figure out post which is clear or matches exactly.. but FAQ link helped a lot..

    i had to finish custom security implementation before 30-Sep (i started it on 24-Sep) .. so unable to reply..back..

    anyways.. after putting custom
    • AuthenticationManager (for Active Directory),
    • ScreenAccessVoter,
    • (extending) GrantedAuthority,
    • (extending) DefaultFilterInvocationDefinitionSource

    for screen based security and instead of writing custom FilterChainProxy and not using <Security> namespace.. i created a bean named _filterSecurityInterceptor which overriding bean created internally by Security namespace..
    Things are working fine.. but want to ask.. whether this approach is proper? or its not.. and may create problems or issues..
    Last edited by nachiket_patel; Oct 6th, 2009 at 04:26 AM.

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

    Default

    No, that's not really recommended. The names are an internal implementation detail. There's no guarantee that replacing the default filters by overriding the bean names won't cause issues - many of the beans created by the namespace are interdependent. This will definitely break with Spring 3.
    Spring - by Pivotal
    twitter @tekul

Tags for this Thread

Posting Permissions

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