mirror of
https://github.com/Sylius/Sylius.git
synced 2026-07-15 01:20:59 +00:00
[API] add customer denormalization context to avoid errors when getting user
This commit is contained in:
parent
985e4b8661
commit
75b8959f48
3 changed files with 11 additions and 2 deletions
|
|
@ -72,10 +72,10 @@
|
|||
<attribute name="method">PUT</attribute>
|
||||
<attribute name="path">/shop/customers/{id}</attribute>
|
||||
<attribute name="normalization_context">
|
||||
<attribute name="groups">shop:customer:read</attribute>
|
||||
<attribute name="groups">shop:customer:update</attribute>
|
||||
</attribute>
|
||||
<attribute name="denormalization_context">
|
||||
<attribute name="groups">shop:customer:update</attribute>
|
||||
<attribute name="groups">shop:customer:denormalize</attribute>
|
||||
</attribute>
|
||||
</itemOperation>
|
||||
</itemOperations>
|
||||
|
|
|
|||
|
|
@ -24,38 +24,46 @@
|
|||
<group>admin:customer:read</group>
|
||||
<group>shop:customer:read</group>
|
||||
<group>shop:customer:update</group>
|
||||
<group>shop:customer:denormalize</group>
|
||||
</attribute>
|
||||
|
||||
<attribute name="firstName">
|
||||
<group>admin:customer:read</group>
|
||||
<group>shop:customer:read</group>
|
||||
<group>shop:customer:update</group>
|
||||
<group>shop:customer:denormalize</group>
|
||||
</attribute>
|
||||
|
||||
<attribute name="lastName">
|
||||
<group>admin:customer:read</group>
|
||||
<group>shop:customer:read</group>
|
||||
<group>shop:customer:update</group>
|
||||
<group>shop:customer:denormalize</group>
|
||||
</attribute>
|
||||
|
||||
<attribute name="fullName">
|
||||
<group>admin:customer:read</group>
|
||||
<group>shop:customer:read</group>
|
||||
<group>shop:customer:update</group>
|
||||
<group>shop:customer:denormalize</group>
|
||||
</attribute>
|
||||
|
||||
<attribute name="defaultAddress">
|
||||
<group>admin:customer:read</group>
|
||||
<group>shop:customer:read</group>
|
||||
<group>shop:customer:update</group>
|
||||
<group>shop:customer:denormalize</group>
|
||||
</attribute>
|
||||
|
||||
<attribute name="subscribedToNewsletter">
|
||||
<group>shop:customer:read</group>
|
||||
<group>shop:customer:update</group>
|
||||
<group>shop:customer:denormalize</group>
|
||||
</attribute>
|
||||
|
||||
<attribute name="user">
|
||||
<group>shop:customer:read</group>
|
||||
<group>shop:customer:update</group>
|
||||
</attribute>
|
||||
</class>
|
||||
</serializer>
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@
|
|||
<class name="Sylius\Component\Core\Model\ShopUser">
|
||||
<attribute name="verified">
|
||||
<group>shop:customer:read</group>
|
||||
<group>shop:customer:update</group>
|
||||
</attribute>
|
||||
</class>
|
||||
</serializer>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue