new Get(
uriTemplate: '/foo/{id}/bar/{name}',
uriVariables: [
'id' => new Link(
fromClass: Bar::class,
security: "is_granted('ROLE_USER') and bar.id === user.bar.id and name !== 'admin-bar'",
securityObjectName: 'bar',
provider: ReadLinkParameterProvider::class,
required: true,
),
],
),
Description
Follow-up of #8279
Also allow the current operation's
uriVariablesto all Link metadata class's security expressions.Example