SEC-2758: Make ROLE_ consistent

This commit is contained in:
Rob Winch
2015-01-29 16:57:56 -06:00
parent 753fdcaef0
commit 6627f76df7
17 changed files with 479 additions and 47 deletions

View File

@@ -68,4 +68,14 @@ public class Jsr250AnnotationDrivenBeanDefinitionParserTests {
target.someAdminMethod();
}
@Test
public void hasAnyRoleAddsDefaultPrefix() {
UsernamePasswordAuthenticationToken token = new UsernamePasswordAuthenticationToken("Test", "Password",
AuthorityUtils.createAuthorityList("ROLE_USER"));
SecurityContextHolder.getContext().setAuthentication(token);
target.rolesAllowedUser();
}
}