Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question about role ADMIN #2

Open
pinootto opened this issue Apr 16, 2013 · 1 comment
Open

Question about role ADMIN #2

pinootto opened this issue Apr 16, 2013 · 1 comment

Comments

@pinootto
Copy link

Is it correct the following configuration in the file applicationContext.xml?

<sec:http pattern="/admin/**" create-session="never">
    <sec:http-basic entry-point-ref="restAuthenticationEntryPoint"/>
    <sec:intercept-url pattern="/**" access="ROLE_USER"/>
</sec:http>
<sec:http pattern="/action/user" create-session="never">
    <sec:http-basic entry-point-ref="restAuthenticationEntryPoint"/>
    <sec:intercept-url pattern="/**" access="ROLE_USER"/>
</sec:http>

The pattern="/admin/**" is associated with ROLE_USER. Is it correct? or should it be associated with ROLE_ADMIN?

@garyhellman
Copy link

I tried switching "/admin/**" to ROLE_ADMIN - then login required "jimi"(ROLE_ADMIN) - "bob"(ROLE_USER) would not authenticate.
However, after jimi logged out, bob could login (with just ROLE_USER) and then also have access to admin screen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants