fix(storage): align default provider fallback with STORAGE_ALLOW_LIST

Extract storage allowlist into internal/storageallowlist so KB creation
uses FirstAllowed when tenant default_provider is empty or disallowed.
Share pickUsableStorageProvider via editorResources for consistent UI
selection, and add regression tests for OBS status and allow-list defaults.
This commit is contained in:
wizardchen
2026-07-15 10:57:32 +08:00
committed by lyingbug
parent 97490ef7ed
commit 139ec1e6b8
10 changed files with 288 additions and 87 deletions
+1 -1
View File
@@ -620,7 +620,7 @@ func (h *SystemHandler) GetStorageEngineStatus(c *gin.Context) {
ks3Configured := h.isKS3Configured(c)
obsConfigured := h.isOBSConfigured(c)
allowed := getAllowedStorageProviders()
allowedProviders := make([]string, 0, len(supportedStorageProviders))
allowedProviders := make([]string, 0, len(getSupportedStorageProviders()))
for _, provider := range getSupportedStorageProviders() {
if allowed[provider] {
allowedProviders = append(allowedProviders, provider)