feat: add file safety config integration
This commit is contained in:
@@ -155,6 +155,24 @@ func (registrationConfigMapper) SMSEnabled() (bool, error) {
|
||||
return configAdp.RegistrationSMSEnabled()
|
||||
}
|
||||
|
||||
// ThirdPartyConfigPersistenceInterface exposes global third-party integration settings.
|
||||
type ThirdPartyConfigPersistenceInterface interface {
|
||||
Get(group string, keys ...string) (map[string]string, error)
|
||||
}
|
||||
|
||||
type thirdPartyConfigMapper struct{}
|
||||
|
||||
// ThirdPartyConfig reads third-party settings from the control database.
|
||||
var ThirdPartyConfig ThirdPartyConfigPersistenceInterface = thirdPartyConfigMapper{}
|
||||
|
||||
func (thirdPartyConfigMapper) Get(group string, keys ...string) (map[string]string, error) {
|
||||
configAdp, ok := adp.(adapter.ThirdPartyConfigAdapter)
|
||||
if !ok {
|
||||
return nil, types.ErrUnsupported
|
||||
}
|
||||
return configAdp.ThirdPartyConfig(group, keys...)
|
||||
}
|
||||
|
||||
// GetByCode resolves a tenant by its public enterprise code.
|
||||
func (tenantsMapper) GetByCode(code string) (*types.Tenant, error) {
|
||||
tenantAdp, ok := adp.(adapter.TenantAdapter)
|
||||
|
||||
Reference in New Issue
Block a user