diff --git a/cmd/policy.go b/cmd/policy.go index 43a9462ab..192aebc28 100644 --- a/cmd/policy.go +++ b/cmd/policy.go @@ -77,6 +77,10 @@ func (sys *PolicySys) Remove(bucketName string) { // IsAllowed - checks given policy args is allowed to continue the Rest API. func (sys *PolicySys) IsAllowed(args policy.Args) bool { + if sys == nil { + return args.IsOwner + } + sys.RLock() defer sys.RUnlock()