From 1008c2c06974881815f8c4b03679325657465bda Mon Sep 17 00:00:00 2001 From: kannappanr <30541348+kannappanr@users.noreply.github.com> Date: Sun, 9 Jun 2019 13:15:57 -0700 Subject: [PATCH] Do not display error logs if user does not have listbuckets privilege (#7370) Fixes #7367 --- cmd/gateway/gcs/gateway-gcs.go | 5 ----- cmd/policy.go | 1 - 2 files changed, 6 deletions(-) diff --git a/cmd/gateway/gcs/gateway-gcs.go b/cmd/gateway/gcs/gateway-gcs.go index 81a7a77e6..6d23ce053 100644 --- a/cmd/gateway/gcs/gateway-gcs.go +++ b/cmd/gateway/gcs/gateway-gcs.go @@ -395,10 +395,6 @@ func (l *gcsGateway) CleanupGCSMinioSysTmp(ctx context.Context) { for { attrs, err := it.Next() if err != nil { - if err != iterator.Done { - ctx := logger.SetReqInfo(context.Background(), &logger.ReqInfo{}) - logger.LogIf(ctx, err) - } break } l.CleanupGCSMinioSysTmpBucket(ctx, attrs.Name) @@ -461,7 +457,6 @@ func (l *gcsGateway) ListBuckets(ctx context.Context) (buckets []minio.BucketInf } if ierr != nil { - logger.LogIf(ctx, ierr) return buckets, gcsToObjectError(ierr) } diff --git a/cmd/policy.go b/cmd/policy.go index b30fba3db..e5f7230dc 100644 --- a/cmd/policy.go +++ b/cmd/policy.go @@ -114,7 +114,6 @@ func (sys *PolicySys) IsAllowed(args policy.Args) bool { func (sys *PolicySys) refresh(objAPI ObjectLayer) error { buckets, err := objAPI.ListBuckets(context.Background()) if err != nil { - logger.LogIf(context.Background(), err) return err } sys.removeDeletedBuckets(buckets)