forked from TrueCloudLab/frostfs-s3-gw
[#488] Sync using oid.ID
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
This commit is contained in:
parent
85c203e157
commit
c88a9842db
18 changed files with 224 additions and 139 deletions
|
@ -174,7 +174,7 @@ func (h *handler) GetObjectLegalHoldHandler(w http.ResponseWriter, r *http.Reque
|
|||
}
|
||||
|
||||
legalHold := &data.LegalHold{Status: legalHoldOff}
|
||||
if lockInfo.LegalHoldOID != nil {
|
||||
if lockInfo.IsLegalHoldSet() {
|
||||
legalHold.Status = legalHoldOn
|
||||
}
|
||||
|
||||
|
@ -248,16 +248,16 @@ func (h *handler) GetObjectRetentionHandler(w http.ResponseWriter, r *http.Reque
|
|||
return
|
||||
}
|
||||
|
||||
if lockInfo.RetentionOID == nil {
|
||||
if !lockInfo.IsRetentionSet() {
|
||||
h.logAndSendError(w, "retention lock isn't set", reqInfo, apiErrors.GetAPIError(apiErrors.ErrNoSuchKey))
|
||||
return
|
||||
}
|
||||
|
||||
retention := &data.Retention{
|
||||
Mode: governanceMode,
|
||||
RetainUntilDate: lockInfo.UntilDate,
|
||||
RetainUntilDate: lockInfo.UntilDate(),
|
||||
}
|
||||
if lockInfo.IsCompliance {
|
||||
if lockInfo.IsCompliance() {
|
||||
retention.Mode = complianceMode
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue