public bool HasRole(RbacRole targetRole) { if (Name == targetRole.Name) { return(true); } return(SubRoles.Any((RbacRole subRole) => subRole.HasRole(targetRole))); }
public bool HasRole(RbacRole targetRole) { return(Roles.Any((RbacRole role) => role.HasRole(targetRole))); }