@ -272,7 +272,7 @@ func checkRequestAuthTypeToAccessKey(ctx context.Context, r *http.Request, actio
var cred auth . Credentials
var cred auth . Credentials
switch getRequestAuthType ( r ) {
switch getRequestAuthType ( r ) {
case authTypeUnknown , authTypeStreamingSigned :
case authTypeUnknown , authTypeStreamingSigned :
return accessKey , owner , ErrAccessDeni ed
return accessKey , owner , ErrSignatureVersionNotSupport ed
case authTypePresignedV2 , authTypeSignedV2 :
case authTypePresignedV2 , authTypeSignedV2 :
if s3Err = isReqAuthenticatedV2 ( r ) ; s3Err != ErrNone {
if s3Err = isReqAuthenticatedV2 ( r ) ; s3Err != ErrNone {
return accessKey , owner , s3Err
return accessKey , owner , s3Err
@ -334,7 +334,7 @@ func checkRequestAuthTypeToAccessKey(ctx context.Context, r *http.Request, actio
// Request is allowed return the appropriate access key.
// Request is allowed return the appropriate access key.
return cred . AccessKey , owner , ErrNone
return cred . AccessKey , owner , ErrNone
}
}
return a ccessKey, owner , ErrAccessDenied
return cred . A ccessKey, owner , ErrAccessDenied
}
}
if globalIAMSys . IsAllowed ( iampolicy . Args {
if globalIAMSys . IsAllowed ( iampolicy . Args {
AccountName : cred . AccessKey ,
AccountName : cred . AccessKey ,
@ -348,7 +348,7 @@ func checkRequestAuthTypeToAccessKey(ctx context.Context, r *http.Request, actio
// Request is allowed return the appropriate access key.
// Request is allowed return the appropriate access key.
return cred . AccessKey , owner , ErrNone
return cred . AccessKey , owner , ErrNone
}
}
return a ccessKey, owner , ErrAccessDenied
return cred . A ccessKey, owner , ErrAccessDenied
}
}
// Verify if request has valid AWS Signature Version '2'.
// Verify if request has valid AWS Signature Version '2'.
@ -472,7 +472,7 @@ func isPutActionAllowed(atype authType, bucketName, objectName string, r *http.R
var owner bool
var owner bool
switch atype {
switch atype {
case authTypeUnknown :
case authTypeUnknown :
return ErrAccessDeni ed
return ErrSignatureVersionNotSupport ed
case authTypeSignedV2 , authTypePresignedV2 :
case authTypeSignedV2 , authTypePresignedV2 :
cred , owner , s3Err = getReqAccessKeyV2 ( r )
cred , owner , s3Err = getReqAccessKeyV2 ( r )
case authTypeStreamingSigned , authTypePresigned , authTypeSigned :
case authTypeStreamingSigned , authTypePresigned , authTypeSigned :