magento / magento2

Prior to making any Submission(s), you must sign an Adobe Contributor License Agreement, available here at: https://opensource.adobe.com/cla.html. All Submissions you make to Adobe Inc. and its affiliates, assigns and subsidiaries (collectively “Adobe”) are subject to the terms of the Adobe Contributor License Agreement.
http://www.magento.com
Open Software License 3.0
11.53k stars 9.31k forks source link

Website restriction -> Private Sale: Login only, preventing registration on API as Admin #38008

Open ghezelbash opened 1 year ago

ghezelbash commented 1 year ago

Preconditions and environment

Steps to reproduce

  1. Go to Stores > Configuration > General > General > Website Restrictions
  2. Set Access Restriction (general/restriction/is_active) to 'Yes' and set Restriction Mode (general/restriction/mode) to Private Sale: Login Only
  3. Clear the config cache
  4. Create an admin integration token from System > Integrations
  5. Send a REST api POST request to /rest/V1/customers to create a customer and include admin integration token as Bearer token as Autorization

Expected result

Since admins can create custumers in Admin area when website restrictions is on, then they should have the ability to create customers via API. Expected: Customer created. (Registration working when the requester is an admin user)

Actual result

API raises a 400 bad request response saying: "Can not register new customer due to restrictions are enabled."

Additional information

No response

Release note

No response

Triage and priority

m2-assistant[bot] commented 1 year ago

Hi @ghezelbash. Thank you for your report. To speed up processing of this issue, make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:

m2-assistant[bot] commented 1 year ago

Hi @engcom-Bravo. Thank you for working on this issue. In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:

engcom-Bravo commented 1 year ago

Hi @ghezelbash,

Thank you for reporting and collaboration.

Verified the issue on Magento 2.4-develop instance with EE edition and the issue is reproducible.Kindly refer the screenshots.

Steps to reproduce

Screenshot 2023-09-27 at 11 50 22 AM

We are not able to customer using REST API's but we are able to create the customer form the admin side .

Hence Confirming the issue.

Thanks.

github-jira-sync-bot commented 1 year ago

:white_check_mark: Jira issue https://jira.corp.adobe.com/browse/AC-9613 is successfully created for this GitHub issue.

m2-assistant[bot] commented 1 year ago

:white_check_mark: Confirmed by @engcom-Bravo. Thank you for verifying the issue.
Issue Available: @engcom-Bravo, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.