Files
Enterprise-Knowledge-Base/internal/handler/storage_allowlist.go
T
wizardchen 139ec1e6b8 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.
2026-07-15 11:05:00 +08:00

20 lines
448 B
Go

package handler
import "github.com/Tencent/WeKnora/internal/storageallowlist"
func getSupportedStorageProviders() []string {
return storageallowlist.Supported()
}
func getAllowedStorageProviders() map[string]bool {
return storageallowlist.AllowedMap()
}
func isStorageProviderAllowed(provider string) bool {
return storageallowlist.IsAllowed(provider)
}
func firstAllowedStorageProvider() string {
return storageallowlist.FirstAllowed()
}