mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-05-30 16:52:13 +00:00
Use Collection<ConfigAttribute> in examples
To match `org.springframework.security.access.ConfigAttribute`.
This commit is contained in:
parent
7560a32460
commit
6e63278ab9
@ -122,7 +122,7 @@ public class AccessDecisionManagerAuthorizationManagerAdapter implements Authori
|
|||||||
@Override
|
@Override
|
||||||
public AuthorizationDecision check(Supplier<Authentication> authentication, Object object) {
|
public AuthorizationDecision check(Supplier<Authentication> authentication, Object object) {
|
||||||
try {
|
try {
|
||||||
Collection<ConfigAttributes> attributes = this.securityMetadataSource.getAttributes(object);
|
Collection<ConfigAttribute> attributes = this.securityMetadataSource.getAttributes(object);
|
||||||
this.accessDecisionManager.decide(authentication.get(), object, attributes);
|
this.accessDecisionManager.decide(authentication.get(), object, attributes);
|
||||||
return new AuthorizationDecision(true);
|
return new AuthorizationDecision(true);
|
||||||
} catch (AccessDeniedException ex) {
|
} catch (AccessDeniedException ex) {
|
||||||
@ -132,7 +132,7 @@ public class AccessDecisionManagerAuthorizationManagerAdapter implements Authori
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void verify(Supplier<Authentication> authentication, Object object) {
|
public void verify(Supplier<Authentication> authentication, Object object) {
|
||||||
Collection<ConfigAttributes> attributes = this.securityMetadataSource.getAttributes(object);
|
Collection<ConfigAttribute> attributes = this.securityMetadataSource.getAttributes(object);
|
||||||
this.accessDecisionManager.decide(authentication.get(), object, attributes);
|
this.accessDecisionManager.decide(authentication.get(), object, attributes);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -155,7 +155,7 @@ public class AccessDecisionVoterAuthorizationManagerAdapter implements Authoriza
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AuthorizationDecision check(Supplier<Authentication> authentication, Object object) {
|
public AuthorizationDecision check(Supplier<Authentication> authentication, Object object) {
|
||||||
Collection<ConfigAttributes> attributes = this.securityMetadataSource.getAttributes(object);
|
Collection<ConfigAttribute> attributes = this.securityMetadataSource.getAttributes(object);
|
||||||
int decision = this.accessDecisionVoter.vote(authentication.get(), object, attributes);
|
int decision = this.accessDecisionVoter.vote(authentication.get(), object, attributes);
|
||||||
switch (decision) {
|
switch (decision) {
|
||||||
case ACCESS_GRANTED:
|
case ACCESS_GRANTED:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user