Skip to content

Commit 04de0a2

Browse files
authored
Includes request to available variables in security (#1238)
1 parent be2a3eb commit 04de0a2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

core/security.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,11 @@ In this example:
100100
* Only users having the `ROLE_ADMIN` or owning the current object can replace an existing book (configured on the `put` operation)
101101
* Only users having the `ROLE_ADMIN` can view or modify the `adminOnlyProperty` property. Only users having the `ROLE_ADMIN` can create a new resource specifying `adminOnlyProperty` value.
102102

103-
Available variables are `user` (the current logged in object, if any), and `object` (the current resource, or collection of resources for collection operations).
103+
Available variables are:
104+
105+
* `user`: the current logged in object, if any
106+
* `object`: the current resource, or collection of resources for collection operations
107+
* `request`: the current request
104108

105109
Access control checks in the `security` attribute are always executed before the [denormalization step](serialization.md).
106110
It means than for `PUT` requests, `object` doesn't contain the value submitted by the user, but values currently stored in [the persistence layer](data-persisters.md).

0 commit comments

Comments
 (0)