getStorageRuleset method

Future<Ruleset> getStorageRuleset([
  1. String? bucket
])

Gets the Ruleset currently applied to a Cloud Storage bucket. Rejects with a not-found error if no ruleset is applied on the bucket.

bucket - Optional name of the Cloud Storage bucket to be retrieved. If not specified, retrieves the ruleset applied on the default bucket configured via AppOptions.storageBucket. Returns a future that fulfills with the Cloud Storage ruleset.

Implementation

Future<Ruleset> getStorageRuleset([String? bucket]) async {
  final bucketName = _getBucketName(bucket);
  return _getRulesetForRelease('$_firebaseStorage/$bucketName');
}