allow method

Topic allow(
  1. List<TopicPermission> permissions
)

Set the function's required permissions for the topic.

Implementation

$t.Topic allow(List<TopicPermission> permissions) {
  if (permissions.isEmpty) {
    throw "Must supply at least one permission for topic $name";
  }

  unawaited(registerPolicy((permissions)).onError((error, stackTrace) {
    print(error);
  }));

  return $t.Topic(name);
}