hasRole method

bool hasRole(
  1. String role
)

Returns whether role is assigned to this principal.

Implementation

bool hasRole(String role) => roles.contains(role);