0

I did something like:

   <intercept-url pattern="/welcome" access = "hasRole 
   ('ROLE_USER') or  hasRole ('ROLE_OWNER')"/>

I can access this page as a user with role user but I cannot access this page as an user with a role owner.One user can only have one role (cannot be user and owner at the same time)Users are connected to roles via @ManyToMany and @Jointable- it works okay in the rest of an app,it just does not work in here. Can you help me to solve this problem?

Revi
  • 50
  • 2
  • 10
  • You should really include some code snippets that illustrate your problem, etc. Otherwise, this question will likely be closed for being poorly asked. – Naros Jun 10 '17 at 20:52
  • 1
    Oh I am really sorry forgot to add code instead of code.I will edit that in a moment! EDIT Done! – Revi Jun 10 '17 at 21:52
  • Possible duplicate of [Spring Security 3 specify multiple intercept-url access roles](https://stackoverflow.com/questions/2103237/spring-security-3-specify-multiple-intercept-url-access-roles) – Naros Jun 10 '17 at 21:57
  • Please see the answer https://stackoverflow.com/a/2105363/1572269 – Naros Jun 10 '17 at 21:57

0 Answers0