Do not display error logs if user does not have listbuckets privilege (#7370)

Fixes #7367
This commit is contained in:
kannappanr 2019-06-09 13:15:57 -07:00 committed by GitHub
parent 7abadfccc2
commit 1008c2c069
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 6 deletions

View File

@ -395,10 +395,6 @@ func (l *gcsGateway) CleanupGCSMinioSysTmp(ctx context.Context) {
for { for {
attrs, err := it.Next() attrs, err := it.Next()
if err != nil { if err != nil {
if err != iterator.Done {
ctx := logger.SetReqInfo(context.Background(), &logger.ReqInfo{})
logger.LogIf(ctx, err)
}
break break
} }
l.CleanupGCSMinioSysTmpBucket(ctx, attrs.Name) l.CleanupGCSMinioSysTmpBucket(ctx, attrs.Name)
@ -461,7 +457,6 @@ func (l *gcsGateway) ListBuckets(ctx context.Context) (buckets []minio.BucketInf
} }
if ierr != nil { if ierr != nil {
logger.LogIf(ctx, ierr)
return buckets, gcsToObjectError(ierr) return buckets, gcsToObjectError(ierr)
} }

View File

@ -114,7 +114,6 @@ func (sys *PolicySys) IsAllowed(args policy.Args) bool {
func (sys *PolicySys) refresh(objAPI ObjectLayer) error { func (sys *PolicySys) refresh(objAPI ObjectLayer) error {
buckets, err := objAPI.ListBuckets(context.Background()) buckets, err := objAPI.ListBuckets(context.Background())
if err != nil { if err != nil {
logger.LogIf(context.Background(), err)
return err return err
} }
sys.removeDeletedBuckets(buckets) sys.removeDeletedBuckets(buckets)