fix(bucket-tenants): make tenant lifecycle and bucket import validation safer
This commit is contained in:
+3
-1
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user