MM-14441: restrict system admin config (#10477)

* tweak utils.Merge docs

* move merge_test to utils_test package for easier testing

* utils: support MergeConfig and StructFieldFilter

* constrain updating certain fields by the restricted system admin
Этот коммит содержится в:
Jesse Hallam
2019-03-21 15:46:38 -04:00
коммит произвёл GitHub
родитель 3d92af2737
Коммит 8c8b1bbc9c
10 изменённых файлов: 316 добавлений и 220 удалений

Просмотреть файл

@@ -26,8 +26,3 @@ func InitializeConfigurationsTable(db *sqlx.DB) error {
func ResolveConfigFilePath(path string) (string, error) {
return resolveConfigFilePath(path)
}
// GetCommonStore exposes the internal commonStore to test only.
func (ms *memoryStore) MergeConfig(patch *model.Config) (*model.Config, error) {
return ms.mergeConfig(patch)
}