mirror of
https://github.com/pgsty/minio.git
synced 2026-08-02 08:35:58 +03:00
load bucket policies using object layer API (#6084)
This PR fixes an issue during gateway mode where underlying policies were not translated into meaningful policies.
This commit is contained in:
committed by
Nitish Tiwari
parent
d9d13c898c
commit
abf209b1dd
@@ -215,6 +215,13 @@ func StartGateway(ctx *cli.Context, gw Gateway) {
|
||||
logger.FatalIf(err, "Unable to initialize gateway backend")
|
||||
}
|
||||
|
||||
if gw.Name() != "nas" {
|
||||
// Initialize policy sys for all gateways. NAS gateway already
|
||||
// initializes policy sys internally, avoid double initialization.
|
||||
// Additionally also don't block the initialization of gateway.
|
||||
go globalPolicySys.Init(newObject)
|
||||
}
|
||||
|
||||
// Once endpoints are finalized, initialize the new object api.
|
||||
globalObjLayerMutex.Lock()
|
||||
globalObjectAPI = newObject
|
||||
|
||||
Reference in New Issue
Block a user