mirror of
https://github.com/minio/minio.git
synced 2025-11-28 21:18:10 -05:00
@@ -719,6 +719,9 @@ next:
|
||||
}
|
||||
|
||||
apiErr := enforceRetentionBypassForDeleteWeb(ctx, r, args.BucketName, objectName, getObjectInfo, govBypassPerms)
|
||||
if apiErr == ErrObjectLocked {
|
||||
return toJSONError(ctx, errLockedObject)
|
||||
}
|
||||
if apiErr != ErrNone && apiErr != ErrNoSuchKey {
|
||||
return toJSONError(ctx, errAccessDenied)
|
||||
}
|
||||
@@ -2140,7 +2143,7 @@ func toWebAPIError(ctx context.Context, err error) APIError {
|
||||
Description: err.Error(),
|
||||
}
|
||||
case errAuthentication, auth.ErrInvalidAccessKeyLength,
|
||||
auth.ErrInvalidSecretKeyLength, errInvalidAccessKeyID:
|
||||
auth.ErrInvalidSecretKeyLength, errInvalidAccessKeyID, errAccessDenied, errLockedObject:
|
||||
return APIError{
|
||||
Code: "AccessDenied",
|
||||
HTTPStatusCode: http.StatusForbidden,
|
||||
|
||||
Reference in New Issue
Block a user