hasRole method

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

Check if user has specific role

Implementation

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