Description
Preconditions and environment
- Magento 2.4.7 Community Edition
- Register a customer for reproduce if needed
Steps to reproduce
- Generate
<CUSTOMER TOKEN>
as described in office document. - Confirm customer data:
curl --request GET 'https://<domain>/rest/V1/customers/me' \
--header 'Authorization: Bearer <CUSTOMER TOKEN>'
Output body:
{
"id": 1,
"email": "[email protected]",
"firstname":"Firstname",
"lastname":"Lastname",
...
"disable_auto_group_change": 0,
"created_in": "Default Store View",
"extension_attributes": {
"is_subscribed": false
}
...
}
- Change customer data:
curl --request PUT 'https://<domain>/rest/V1/customers/me' \
--header 'Authorization: Bearer <CUSTOMER TOKEN>' \
--header 'Content-Type: application/json' \
--data-raw '{
"customer": {
"id": 1,
"email": "[email protected]",
"firstname":"Firstname",
"lastname":"Lastname",
"disable_auto_group_change": 1,
"created_in": "Changed",
"confirmation": "Hello",
"extension_attributes": {
"is_subscribed": true
}
}
}'
- Confirm customer data again:
curl --request GET 'https://<domain>/rest/V1/customers/me' \
--header 'Authorization: Bearer <CUSTOMER TOKEN>'
Output body:
{
"id": 1,
"email": "[email protected]",
"firstname":"Firstname",
"lastname":"Lastname",
...
"disable_auto_group_change": 1,
"created_in": "Changed",
"confirmation": "Hello",
"extension_attributes": {
"is_subscribed": true
}
...
}
Expected result
At least disable_auto_group_change
and confirmation
should not be changed.
Maybe Magento WebAPI needs to throw exception.
Actual result
Both disable_auto_group_change
, created_in
, confirmation
and extension_attributes.is_subscribed
is editable in Customer User Context.
disable_auto_group_change
checkbox change can be confirmed on Admin Panel.
Additional information
disable_auto_group_change
: it should only be changeable by Admin or Integration.
created_in
: this attribute is set during registration but not used elsewhere.
confirmation
: it should only be changeable by Admin or Integration.
extension_attributes.is_subscribed
: this one should only be changeable by unsubscribe link?
Additional:
disable_auto_group_change
and confirmation
should not be visible
in Customer User Context WebAPI output.
Release note
No response
Triage and priority
- Severity: S0 - Affects critical data or functionality and leaves users without workaround.
- Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
- Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
- Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
- Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.
Metadata
Metadata
Assignees
Type
Projects
Status