Merge Add hasAnyRole method in AuthorizePayloadsSpec.Access

This commit is contained in:
Rob Winch
2019-09-30 14:14:59 -05:00
2 changed files with 26 additions and 0 deletions

View File

@@ -104,8 +104,12 @@ import java.util.List;
* }
* </pre>
* @author Rob Winch
<<<<<<< HEAD
* @author Jesús Ascama Arias
* @author Luis Felipe Vega
=======
* @author Manuel Tejeda
>>>>>>> 9926ad68b8f4e465f6c5243a8ff993fbf9d1b7a2
* @since 5.2
*/
public class RSocketSecurity {
@@ -321,6 +325,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)));