[#535] Support public access block operations
Signed-off-by: Marina Biryukova <m.biryukova@yadro.com>
This commit is contained in:
parent
4f0f2ca7bd
commit
a7ce40d745
23 changed files with 940 additions and 87 deletions
|
@ -100,14 +100,15 @@ func (h *handler) GetBucketObjectLockConfigHandler(w http.ResponseWriter, r *htt
|
|||
return
|
||||
}
|
||||
|
||||
if settings.LockConfiguration == nil {
|
||||
settings.LockConfiguration = &data.ObjectLockConfiguration{}
|
||||
newSettings := *settings
|
||||
if newSettings.LockConfiguration == nil {
|
||||
newSettings.LockConfiguration = &data.ObjectLockConfiguration{}
|
||||
}
|
||||
if settings.LockConfiguration.ObjectLockEnabled == "" {
|
||||
settings.LockConfiguration.ObjectLockEnabled = enabledValue
|
||||
if newSettings.LockConfiguration.ObjectLockEnabled == "" {
|
||||
newSettings.LockConfiguration.ObjectLockEnabled = enabledValue
|
||||
}
|
||||
|
||||
if err = middleware.EncodeToResponse(w, settings.LockConfiguration); err != nil {
|
||||
if err = middleware.EncodeToResponse(w, newSettings.LockConfiguration); err != nil {
|
||||
h.logAndSendError(ctx, w, "something went wrong", reqInfo, err)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue