Improve and add two-way replication functionality; Update docs

This commit is contained in:
2025-11-22 15:02:29 +08:00
parent 96de6164d1
commit ec5d52f208
4 changed files with 40 additions and 3 deletions

View File

@@ -1043,6 +1043,7 @@ def bucket_handler(bucket_name: str) -> Response:
try:
storage.delete_bucket(bucket_name)
_bucket_policies().delete_policy(bucket_name)
_replication_manager().delete_rule(bucket_name)
except StorageError as exc:
code = "BucketNotEmpty" if "not empty" in str(exc) else "NoSuchBucket"
status = 409 if code == "BucketNotEmpty" else 404

View File

@@ -500,6 +500,7 @@ def delete_bucket(bucket_name: str):
_authorize_ui(principal, bucket_name, "delete")
_storage().delete_bucket(bucket_name)
_bucket_policies().delete_policy(bucket_name)
_replication_manager().delete_rule(bucket_name)
flash(f"Bucket '{bucket_name}' removed", "success")
except (StorageError, IamError) as exc:
flash(_friendly_error_message(exc), "danger")