mirror of
https://github.com/minio/minio.git
synced 2025-12-02 06:07:51 -05:00
Fix review comments and new changes in config (#8515)
- Migrate and save only settings which are enabled - Rename logger_http to logger_webhook and logger_http_audit to audit_webhook - No more pretty printing comments, comment is a key=value pair now. - Avoid quotes on values which do not have space in them - `state="on"` is implicit for all SetConfigKV unless specified explicitly as `state="off"` - Disabled IAM users should be disabled always
This commit is contained in:
@@ -42,14 +42,13 @@ func SetRegion(c Config, name string) {
|
||||
|
||||
// SetWorm - One time migration code needed, for migrating from older config to new for Worm mode.
|
||||
func SetWorm(c Config, b bool) {
|
||||
if !b {
|
||||
// We don't save disabled configs
|
||||
return
|
||||
}
|
||||
// Set the new value.
|
||||
c[WormSubSys][Default] = KVS{
|
||||
State: func() string {
|
||||
if b {
|
||||
return StateOn
|
||||
}
|
||||
return StateOff
|
||||
}(),
|
||||
State: StateOn,
|
||||
Comment: "Settings for WORM, after migrating config",
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user