hasAnyRole method

  1. @override
Future<bool> hasAnyRole(
  1. String userId,
  2. List<String> roles, {
  3. String? resource,
  4. Map<String, dynamic>? context,
})
override

Check if user has any of the specified roles

Implementation

@override
Future<bool> hasAnyRole(
  String userId,
  List<String> roles, {
  String? resource,
  Map<String, dynamic>? context,
}) async {
  final data = await getAuthorization(
    userId,
    resource: resource,
    context: context,
  );
  return data.hasAnyRole(roles);
}