79784194

Date: 2025-10-07 03:40:43
Score: 0.5
Natty:
Report link

I guess why Spring Security(formerly Acegi) is adding a ROLE_ prefix, is because Acegi was doing it:

The default AccessDecisionManager (which interprets the access attributes that you specify in the intercept-url element) uses a RoleVoter implementation. By default this looks for the prefix "ROLE_" on the attribute

[Spring Security remove RoleVoter prefix]

Spring security RoleVoter needs a prefix in order to distinguish the granted authorities that are roles

[Why does Spring Security's RoleVoter need a prefix?]

If you don't configure RoleVoter with a prefix then it would check if the user has the authority

Reasons:
  • RegEx Blacklisted phrase (1.5): fix?
  • Long answer (-0.5):
  • No code block (0.5):
  • High reputation (-1):
Posted by: jumping_monkey