Add GrantedAuthorityDefaults to Expression Handler
Issue gh-9289
This commit is contained in:
parent
68cf74468c
commit
62d77ec97e
|
@ -107,7 +107,11 @@ final class MethodSecurityConfiguration implements ImportAware, InitializingBean
|
|||
|
||||
private MethodSecurityExpressionHandler getMethodSecurityExpressionHandler() {
|
||||
if (this.methodSecurityExpressionHandler == null) {
|
||||
this.methodSecurityExpressionHandler = new DefaultMethodSecurityExpressionHandler();
|
||||
DefaultMethodSecurityExpressionHandler methodSecurityExpressionHandler = new DefaultMethodSecurityExpressionHandler();
|
||||
if (this.grantedAuthorityDefaults != null) {
|
||||
methodSecurityExpressionHandler.setDefaultRolePrefix(this.grantedAuthorityDefaults.getRolePrefix());
|
||||
}
|
||||
this.methodSecurityExpressionHandler = methodSecurityExpressionHandler;
|
||||
}
|
||||
return this.methodSecurityExpressionHandler;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue