add hasAnyRole method in AuthorizePayloadsSpec.Access
This commit is contained in:
@@ -104,6 +104,7 @@ import java.util.List;
|
||||
* }
|
||||
* </pre>
|
||||
* @author Rob Winch
|
||||
* @author Manuel Tejeda
|
||||
* @since 5.2
|
||||
*/
|
||||
public class RSocketSecurity {
|
||||
@@ -315,6 +316,10 @@ public class RSocketSecurity {
|
||||
return access(AuthorityReactiveAuthorizationManager.hasRole(role));
|
||||
}
|
||||
|
||||
public AuthorizePayloadsSpec hasAnyRole(String... roles) {
|
||||
return access(AuthorityReactiveAuthorizationManager.hasAnyRole(roles));
|
||||
}
|
||||
|
||||
public AuthorizePayloadsSpec permitAll() {
|
||||
return access((a, ctx) -> Mono
|
||||
.just(new AuthorizationDecision(true)));
|
||||
|
||||
Reference in New Issue
Block a user