allowed method

bool allowed(
  1. String topic
)

Whether scopes may see topic.

Implementation

bool allowed(String topic) {
  final need = TopicTable.of(topic)?.scope ?? 'any';
  if (need == 'any' || need == 'anon') return scopes != null;
  return scopes?.contains(need) ?? false;
}