diff --git a/acl.go b/acl.go index c5c45dfc..ea514167 100644 --- a/acl.go +++ b/acl.go @@ -27,9 +27,6 @@ func (b bucketACL) isValidBucketACL() bool { fallthrough case b.isAuthenticated(): return true - case b.String() == "private": - // by default its "private" - return true default: return false } @@ -47,19 +44,22 @@ const ( ) func (b bucketACL) String() string { - if string(b) == "" { + if !b.isValidBucketACL() { + return string(b) + } + if b.isPrivate() { return "private" } - if string(b) == "readonly" { + if b.isReadOnly() { return "public-read" } - if string(b) == "public" { + if b.isPublic() { return "public-read-write" } - if string(b) == "authenticated" { + if b.isAuthenticated() { return "authenticated-read" } - return string(b) + return "private" } // IsPrivate - is acl Private diff --git a/pkg/console/console.go b/pkg/console/console.go index 9c97a446..d5158bab 100644 --- a/pkg/console/console.go +++ b/pkg/console/console.go @@ -67,7 +67,7 @@ var ( theme := GetDefaultThemeName() // if not a TTY disable color if !isatty(os.Stdout.Fd()) || !isatty(os.Stderr.Fd()) { - return "nocolor" + theme = "nocolor" } return theme }()