Quick support to server level WORM (#5602)

This is a trival fix to support server level WORM.  The feature comes
with an environment variable `MINIO_WORM`.

Usage:
```
$ export MINIO_WORM=on
$ minio server endpoint
```
This commit is contained in:
Bala FA
2018-03-28 05:14:45 +05:30
committed by kannappanr
parent 2182c1a4f7
commit 3ebe61abdf
11 changed files with 120 additions and 4 deletions

View File

@@ -911,6 +911,8 @@ func toAPIErrorCode(err error) (apiErr APIErrorCode) {
apiErr = ErrBucketAlreadyOwnedByYou
case ObjectNotFound:
apiErr = ErrNoSuchKey
case ObjectAlreadyExists:
apiErr = ErrMethodNotAllowed
case ObjectNameInvalid:
apiErr = ErrInvalidObjectName
case InvalidUploadID: