-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Fixed Issue #14633 Sub-admin role related issue in order view page in magento 2 admin #30001
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed Issue #14633 Sub-admin role related issue in order view page in magento 2 admin #30001
Conversation
Update Creditmemos.php Update Shipments.php Update Creditmemos.php Update Invoices.php Update Invoices.php Update Creditmemos.php Update Shipments.php Update Creditmemos.php Update Invoices.php Update Creditmemos.php Update Creditmemos.php Made Requested Changes
Hi @hws47a. Thank you for your contribution
❗ Automated tests can be triggered manually with an appropriate comment:
You can find more information about the builds here ℹ️ Please run only needed test builds instead of all when developing. Please run all test builds before sending your PR for review. For more details, please, review the Magento Contributor Guide documentation. 🕙 You can find the schedule on the Magento Community Calendar page. 📞 The triage of Pull Requests happens in the queue order. If you want to speed up the delivery of your contribution, please join the Community Contributions Triage session to discuss the appropriate ticket. 🎥 You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel ✏️ Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @hws47a,
In general your changes looks good to me. Could you cover your changes with some type of tests?
@magento run all tests |
@ihor-sviziev I have no problems writing unit tests for this. However, it'll have pretty limited value for this case. MFTF tests will be more appropriate in this case, but not sure if'll have enough energy and time for that 🙂 |
@hws47a I think there will be suitable mftf or integration tests. Please try to write tests, if you'll have any issues - we'll try to help you |
app/code/Magento/Sales/Block/Adminhtml/Order/View/Tab/Creditmemos.php
Outdated
Show resolved
Hide resolved
app/code/Magento/Sales/Block/Adminhtml/Order/View/Tab/Invoices.php
Outdated
Show resolved
Hide resolved
app/code/Magento/Sales/Block/Adminhtml/Order/View/Tab/Shipments.php
Outdated
Show resolved
Hide resolved
@magento run all tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @hws47a,
About the test results:
- SVC - ✔seems like false positive, reported an issue for that magento/magento-semver#50
- functional tests - ✔seems like not related to changes from this PR.
- static tests - ❌ could you fix these failures? Unfortunately we need to make changed files to pass static test, even if before
changing they weren't.
Could you also cover your changes with MFTF test(s)?
@ihor-sviziev thanks for your checks. |
@hws47a if you don't have env for running and writing MFTF tests I would recommend you https://warden.dev/, there is quite good and clear docs. |
Pull Request state was updated. Re-review required.
It needs to approve, SVC falls with errors:
|
@engcom-Charlie @sidolov should it be closed? |
@magento run Semantic Version Checker |
Approval Request: https://jira.corp.magento.com/browse/MC-41920 |
Hi @sivaschenko, thank you for the review. |
The SVC failure is approved |
… view page in magento 2 admin #30001
Hi @hws47a, thank you for your contribution! |
This PR is replacing #20903 with some code style fixes and improvements.
*All further description is copy-pasted from the previous PR
Description (*)
Fixed Issue #14633 Sub-admin role related issue in order view page in magento 2 admin
Fixed Issues (if relevant)
Manual testing scenarios (*)
I have created one sub admin user from Magento admin. This user can only view orders, add a comment and operate on shipping. I gave some permissions for sub admin user. Please check the below image:

So as you can see I have disabled Invoice and Credit memo role of this sub-admin.
But when I logged in as sub admin and go to order view page.Sometime Pop will come with "Something Went Wrong" and sometimes js error comes in console
Contribution checklist (*)