Results 1 to 2 of 2

Thread: Best practice recommendation regarding role based views

  1. #1
    Join Date
    Oct 2005
    Location
    Berlin, GER
    Posts
    5

    Default Best practice recommendation regarding role based views

    Hi,

    is there a recommended practice creating a login based web app with multiple views based on the role of the logged in user?

    I have a login page where a user logs in. Now, the app should redirect the user to different areas. Let's say a user with the role Admin logs in, then all he sees is below /admin, a editor logs in and sees all pages under /editor.

    Ok, honestly I am searching for a HOW-TO not a best practice recommandation...

    Regards

  2. #2
    Join Date
    Aug 2004
    Location
    Sydney, Australia
    Posts
    2,768

    Default

    You'd be using AuthenticationProcessingFilter, which subclasses AbstractProcessingFilter. The latter has an alwaysUseDefaultTargetUrl. I'd set it to true, and specify the URL with the defaultTargetUrl property. If you need different redirects based on the roles held, write a JSP that uses the <authz> taglib and sends a response redirect to the browser.
    Ben Alex
    Project Founder, Spring UAA, Spring Roo and Spring Security

Similar Threads

  1. LDAPPasswordAuthenticationDao problem
    By benoit_m35 in forum Security
    Replies: 15
    Last Post: Jan 11th, 2006, 07:04 AM
  2. Account based role for authorization.
    By raval in forum Security
    Replies: 1
    Last Post: Sep 19th, 2005, 08:43 AM
  3. Only Role Based security!!!!!!!!????????
    By sajid2045 in forum Security
    Replies: 6
    Last Post: Apr 22nd, 2005, 10:59 AM
  4. Role based security and Spring
    By spring04 in forum Security
    Replies: 1
    Last Post: Jan 19th, 2005, 03:18 PM
  5. Views based on roles
    By Rob Clews in forum Security
    Replies: 3
    Last Post: Aug 20th, 2004, 05:48 PM

Posting Permissions

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