allow method

Queue allow(
  1. List<QueuePermission> permissions
)

Set the function's required permissions to the queue.

Implementation

Queue allow(List<QueuePermission> permissions) {
  if (permissions.isEmpty) {
    throw "Must supply at least one permission for queue $name";
  }

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

  return Queue(name);
}