mirror of
https://github.com/minio/minio.git
synced 2025-11-13 07:11:44 -05:00
Avoid crash when policy subsystem is not initialized (#6326)
Fixes #6324
This commit is contained in:
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user