You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Only users having [the role](https://symfony.com/doc/current/security.html#roles)`ROLE_ADMIN` can create a new resource (configured on the `post` operation)
102
102
* Only users having the `ROLE_ADMIN` or owning the current object can replace an existing book (configured on the `put` operation)
103
103
* 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.
104
+
* Only users that are granted the `UPDATE` attribute on the book (via a voter) can write to the field
104
105
105
106
Available variables are:
106
107
107
108
*`user`: the current logged in object, if any
108
-
*`object`: the current resource, or collection of resources for collection operations
109
+
*`object`: the current resource, or collection of resources for collection operations (note: this is `null` for update/create operations)
110
+
*`previous_object`: (`security_post_denormalize` only) a clone of `object`, before modifications were made - this is `null` for create operations
109
111
*`request`: the current request
110
112
111
113
Access control checks in the `security` attribute are always executed before the [denormalization step](serialization.md).
0 commit comments