21126: Add AllowTrashWhenReadOnly flag.
[arvados.git] / services / keepstore / unix_volume.go
index 8c935dcddb249eb508450d17c1921ca6717ee931..dee4bdc1c1ed1d59badb076dedac2615eef3f2d7 100644 (file)
@@ -442,8 +442,7 @@ func (v *UnixVolume) Trash(loc string) error {
        // be re-written), or (b) Touch() will update the file's timestamp and
        // Trash() will read the correct up-to-date timestamp and choose not to
        // trash the file.
-
-       if v.volume.ReadOnly || !v.cluster.Collections.BlobTrash {
+       if v.volume.ReadOnly && !v.volume.AllowTrashWhenReadOnly {
                return MethodDisabledError
        }
        if err := v.lock(context.TODO()); err != nil {