mirror of
https://github.com/status-im/consul.git
synced 2025-01-11 14:24:39 +00:00
Fill the Authz Context with a Sentinel Scope (#6729)
This commit is contained in:
parent
ab5a05f71d
commit
ff8157fb51
@ -48,8 +48,9 @@ func kvsPreApply(srv *Server, rule acl.Authorizer, op api.KVOp, dirEnt *structs.
|
||||
}
|
||||
|
||||
default:
|
||||
// TODO (namespaces) use actual ent authz context - ensure we set the Sentinel Scope
|
||||
if rule.KeyWrite(dirEnt.Key, nil) != acl.Allow {
|
||||
var authzContext acl.EnterpriseAuthorizerContext
|
||||
dirEnt.FillAuthzContext(&authzContext)
|
||||
if rule.KeyWrite(dirEnt.Key, &authzContext) != acl.Allow {
|
||||
return false, acl.ErrPermissionDenied
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user