-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
fix saving inactive admin user, when record doesn't exist in oauth_token table #22118
Conversation
Hi @dxx004. Thank you for your contribution
For more details, please, review the Magento Contributor Assistant documentation |
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.
@dxx004 please report an issue so that it can be verified first.
try { | ||
$this->adminTokenService->revokeAdminAccessToken($object->getId()); | ||
} catch (LocalizedException $e) { | ||
//token for admin use doesn't exist in oauth_token table, no action |
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.
This exception looks like intentionally not caught before. What are other possibilities of fix?
Hi @dxx004, thank you for your contribution! |
@dxx004 oh, thanks, that's why it is a good idea to search for existing bug report :) |
Description (*)
PR handles thrown exception during saving inactive admin user or saving admin rule with inactive admin user assigned, when record (for the admin user) doesn't exist in
oauth_token
table.Fixed Issues (if relevant)
Manual testing scenarios (*)
the same error is shown, when trying to assign inactive admin user to admin role and save.
Contribution checklist (*)