fix(bucket-tenants): make tenant lifecycle and bucket import validation safer

This commit is contained in:
2026-05-02 12:09:13 +00:00
parent 7020810b5e
commit b075de1ecd
23 changed files with 435 additions and 183 deletions
+3 -1
View File
@@ -591,12 +591,14 @@ export class SmartStorage {
}
public async listBucketTenants(): Promise<IBucketTenantMetadata[]> {
this.assertTenantAuthEnabled();
return this.bridge.sendCommand('listBucketTenants', {});
}
public async getBucketTenantDescriptor(optionsArg: {
bucketName: string;
}): Promise<IBucketTenantDescriptor> {
this.assertTenantAuthEnabled();
const credential = await this.bridge.sendCommand('getBucketTenantCredential', {
bucketName: optionsArg.bucketName,
});
@@ -653,7 +655,7 @@ export class SmartStorage {
const [stats, credentials, tenants, cluster] = await Promise.all([
this.getStorageStats(),
this.listCredentials(),
this.listBucketTenants(),
this.config.auth.enabled ? this.listBucketTenants() : Promise.resolve([]),
this.getClusterHealth(),
]);
return {