Results 1 to 2 of 2
  1. #1
    ngoc61 is offline Member
    Join Date
    Mar 2009
    Posts
    2
    Rep Power
    0

    Default Custom role in spring security

    In spring security config, role always start with prefix "ROLE_". Please help me how to change "ROLE_" to "USER"

  2. #2
    marckun is offline Member
    Join Date
    Aug 2009
    Posts
    1
    Rep Power
    0

    Default

    hmmmm have you tried putting this line in your security.xml:

    PHP Code:
    .............
      <beans:bean id="accessDecisionManager" class="org.springframework.security.vote.AffirmativeBased" >
        <beans:property name="decisionVoters">
          <beans:bean class="org.springframework.security.vote.RoleVoter">
            <beans:property name="rolePrefix" value=""/>
            </beans:bean>
        </beans:property>
      </beans:bean>   
    .............
    also:

    PHP Code:
    	<http auto-config="true" session-fixation-protection="none" 
    		access-decision-manager-ref="accessDecisionManager">
    		............
    	</http>
    i dont know if that will work.. hehehe im no expert..

    -marckun

Similar Threads

  1. spring security and struts2
    By ngoc61 in forum Web Frameworks
    Replies: 0
    Last Post: 03-09-2009, 09:26 AM
  2. RAndom role dice
    By thenewsaw in forum JCreator
    Replies: 1
    Last Post: 02-07-2009, 02:10 AM
  3. What are Custom Scopes in Spring Framework
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 03-31-2008, 10:09 AM
  4. Java Web Developer - Permanent Role - Swindon
    By Mike Brown in forum Jobs Offered
    Replies: 0
    Last Post: 02-12-2008, 04:21 PM
  5. Replies: 1
    Last Post: 07-23-2007, 11:59 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
  •