Skip to content

Commit 70d20b4

Browse files
authored
Add enable_link_security (#1942)
1 parent 9c1ba94 commit 70d20b4

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

core/subresources.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ In order to use Symfony's built-in security system on subresources the security
339339

340340
To restrict the access to a subresource based on the parent object simply use the Symfony expression language as you would do normally, with the exception that the name defined in `toProperty` or `fromProperty` is used to access the object.
341341

342-
Alternatively you can also use the `securityObjectName` to set a custom name
342+
Alternatively you can also use the `securityObjectName` to set a custom name.
343343

344344
```php
345345
<?php
@@ -357,3 +357,11 @@ class Company {
357357
// ...
358358
}
359359
```
360+
361+
This is currently an experimental feature disabled by default. To enable it please set `enable_link_security` to true:
362+
363+
```yaml
364+
# api/config/packages/api_platform.yaml
365+
api_platform:
366+
enable_link_security: true
367+
```

0 commit comments

Comments
 (0)