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.29k stars 9.27k forks source link

Only deny customer access to order if it actually exists #38647

Open indykoning opened 3 weeks ago

indykoning commented 3 weeks ago

Description (*)

This allows loading nonexistent orders by customer. Before: loading an empty order as a customer would trigger this check resulting in "No such entity with orderId = ", as there is no orderId yet since it doesn't exist yet. Which means the order should be allowed.

After: Loading an empty order results in the empty order being returned, if it is a preexisting order the old checks apply

Contribution checklist (*)

Resolved issues:

  1. [x] resolves magento/magento2#38650: Only deny customer access to order if it actually exists
m2-assistant[bot] commented 3 weeks ago

Hi @indykoning. Thank you for your contribution! Here are some useful tips on how you can test your changes using Magento test environment.

Add the comment under your pull request to deploy test or vanilla Magento instance: - `@magento give me test instance` - deploy test instance based on PR changes - `@magento give me 2.4-develop instance` - deploy vanilla Magento instance

:exclamation: Automated tests can be triggered manually with an appropriate comment:

<test-build(s)> is a comma-separated list of build names.

Allowed build names are: 1. `Database Compare` 2. `Functional Tests CE` 3. `Functional Tests EE` 4. `Functional Tests B2B` 5. `Integration Tests` 6. `Magento Health Index` 7. `Sample Data Tests CE` 8. `Sample Data Tests EE` 9. `Sample Data Tests B2B` 10. `Static Tests` 11. `Unit Tests` 12. `WebAPI Tests` 13. `Semantic Version Checker`

You can find more information about the builds here :information_source: Run only required test builds during development. Run all test builds before sending your pull request for review.


For more details, review the Code Contributions documentation. Join Magento Community Engineering Slack and ask your questions in #github channel.

engcom-Charlie commented 3 weeks ago

@magento create issue