mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-07-13 09:02:09 -04:00
groupware: introduce temporary configuration property GROUPWARE_ENABLE_MOCK_DATA that controls whether the mock addressbook and mock contacts should be injected or not; default is false/disabled since it is not fully functional yet
This commit is contained in:
@@ -23,6 +23,8 @@ type Config struct {
|
||||
TokenManager *TokenManager `yaml:"token_manager"`
|
||||
|
||||
Context context.Context `yaml:"-"`
|
||||
|
||||
EnableMockData bool `env:"GROUPWARE_ENABLE_MOCK_DATA"`
|
||||
}
|
||||
|
||||
type MailMasterAuth struct {
|
||||
|
||||
@@ -58,6 +58,7 @@ func DefaultConfig() *config.Config {
|
||||
Service: config.Service{
|
||||
Name: "groupware",
|
||||
},
|
||||
EnableMockData: false,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -399,7 +399,7 @@ func NewGroupware(config *config.Config, logger *log.Logger, mux *chi.Mux, prome
|
||||
addressBookListSuppliers = append(addressBookListSuppliers, j)
|
||||
contactCardQuerySuppliers = append(contactCardQuerySuppliers, j)
|
||||
}
|
||||
{
|
||||
if config.EnableMockData {
|
||||
m := newMockContactCardSupplier()
|
||||
addressBookListSuppliers = append(addressBookListSuppliers, m)
|
||||
contactCardQuerySuppliers = append(contactCardQuerySuppliers, m)
|
||||
|
||||
Reference in New Issue
Block a user