Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for IsObjectLockGovernanceBypassSet (0.2 sec)

  1. cmd/bucket-object-lock.go

    			// and must explicitly include x-amz-bypass-governance-retention:true
    			// as a request header with any request that requires overriding
    			// governance mode.
    			//
    			byPassSet := objectlock.IsObjectLockGovernanceBypassSet(r.Header)
    			if !byPassSet {
    				t, err := objectlock.UTCNowNTP()
    				if err != nil {
    					internalLogIf(ctx, err, logger.WarningKind)
    					return ObjectLocked{}
    				}
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 13.2K bytes
    - Viewed (0)
  2. internal/bucket/object/lock/lock.go

    func IsObjectLockLegalHoldRequested(h http.Header) bool {
    	_, ok := h[AmzObjectLockLegalHold]
    	return ok
    }
    
    // IsObjectLockGovernanceBypassSet returns true if object lock governance bypass header is set.
    func IsObjectLockGovernanceBypassSet(h http.Header) bool {
    	return strings.EqualFold(h.Get(AmzObjectLockBypassRetGovernance), "true")
    }
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Sat Jun 29 01:20:27 UTC 2024
    - 17.1K bytes
    - Viewed (0)
  3. internal/bucket/object/lock/lock_test.go

    		},
    		{
    			header: http.Header{
    				AmzObjectLockBypassRetGovernance: []string{"true"},
    			},
    			expectedVal: true,
    		},
    	}
    	for _, tt := range tests {
    		actualVal := IsObjectLockGovernanceBypassSet(tt.header)
    		if actualVal != tt.expectedVal {
    			t.Fatalf("error: expected %v, actual %v", tt.expectedVal, actualVal)
    		}
    	}
    }
    
    func TestParseObjectLockRetentionHeaders(t *testing.T) {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Sat Jun 29 01:20:27 UTC 2024
    - 17.1K bytes
    - Viewed (0)
  4. cmd/object-multipart-handlers.go

    	// does not use these headers, and should not be passed down to checkPutObjectLockAllowed
    	if objectlock.IsObjectLockRequested(r.Header) || objectlock.IsObjectLockGovernanceBypassSet(r.Header) {
    		writeErrorResponse(ctx, w, errorCodes.ToAPIErr(ErrInvalidRequest), r.URL)
    		return
    	}
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Sat Aug 31 18:25:48 UTC 2024
    - 39.2K bytes
    - Viewed (0)
Back to top