mirror of
https://github.com/minio/minio.git
synced 2025-01-23 12:43:16 -05:00
Avoid crash when policy subsystem is not initialized (#6326)
Fixes #6324
This commit is contained in:
parent
19db921555
commit
beb6d40ce6
@ -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()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user