mirror of
https://github.com/minio/minio.git
synced 2025-10-28 23:35:01 -04:00
Check legalHoldPerm (#21508)
The provided parameter should be checked before accepting legal hold
This commit is contained in:
parent
376fbd11a7
commit
ffcfa36b13
@ -297,6 +297,9 @@ func checkPutObjectLockAllowed(ctx context.Context, rq *http.Request, bucket, ob
|
||||
if legalHold, lerr = objectlock.ParseObjectLockLegalHoldHeaders(rq.Header); lerr != nil {
|
||||
return mode, retainDate, legalHold, toAPIErrorCode(ctx, lerr)
|
||||
}
|
||||
if legalHoldPermErr != ErrNone {
|
||||
return mode, retainDate, legalHold, legalHoldPermErr
|
||||
}
|
||||
}
|
||||
|
||||
if retentionRequested {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user