Skip to content

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

Open
@ghezelbash

Description

@ghezelbash

Preconditions and environment

  • Magento version: 2.4.5-p2 commerce
  • Go to Stores > Configuration > General > General > Website Restrictions, set Access Restriction (general/restriction/is_active) to 'Yes' and set Restriction Mode (general/restriction/mode) to Private Sale: Login Only
  • Create an admin integration token

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

  • 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

No one assigned

    Labels

    Area: APIsComponent: CustomerIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedPriority: P2A defect with this priority could have functionality issues which are not to expectations.Progress: ready for devReported on 2.4.5-p2Indicates original Magento version for the Issue report.Reproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branch

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions