Use stored entmeta to fill authzContext

This commit is contained in:
freddygv 2021-10-14 08:57:40 -06:00
parent bdf3e951f8
commit f76fddb28e
1 changed files with 1 additions and 2 deletions

View File

@ -186,8 +186,7 @@ func (s *ConnectCA) Sign(
"we are %s", serviceID.Datacenter, s.srv.config.Datacenter)
}
} else if isAgent {
entMeta := structs.DefaultEnterpriseMetaInPartition(agentID.PartitionOrDefault())
entMeta.FillAuthzContext(&authzContext)
agentID.GetEnterpriseMeta().FillAuthzContext(&authzContext)
if authz.NodeWrite(agentID.Agent, &authzContext) != acl.Allow {
return acl.ErrPermissionDenied
}