-
Notifications
You must be signed in to change notification settings - Fork 332
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: [M3-7796] - Correct Default VPC Scope and Adjust PAT Creation Behavior #10226
fix: [M3-7796] - Correct Default VPC Scope and Adjust PAT Creation Behavior #10226
Conversation
β¦ction in Create PAT drawer
Coverage Report: β
|
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.
Nice π
if (scope[0] === 'vpc' && value === 1) { | ||
return [scope[0], 0]; | ||
} | ||
return [scope[0], value]; |
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.
Optional: Not sure exactly how to word this or if it makes any sense for this, but it could be nice if this chunk of code and excludedScopesFromSelectAll
could pull from one source of truth array/object.
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.
Does b15337e make sense?
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.
Yes, I think so!
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.
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.
Confirmed that the disabled VPC Read Only radio button is not selected when selecting all and defaults to None instead. View Scopes drawer is displaying None as expected β
@abailly-akamai - I went with yes because otherwise it was an odd experience for the user to click the Select All > Read Only and not see their action reflected in a checked radio button. All are "Read Only" except any that can't be and have other defaults. |
Description π
There is an issue with the current Personal Access Token (PAT) creation process. When using the "Select All" option, it incorrectly selects the VPC scope even when it is disabled. This behavior could lead to unintentional granting of access and needs to be corrected to improve the usability and security of the platform.
Changes π
handleSelectAllScopes
function to explicitly handle the VPC case whereRead Only
is checked, which should instead beNone
for that scope.allScopesAreTheSame
util to optionally pass in excluded scopes, allowing the correct "Select All" radio button to be checked when some scopes have a different default.CreateAPITokenDrawer.test.tsx
and APITokenutils.test.ts
.Preview π·
How to test π§ͺ
Prerequisites
(How to setup test environment)
yarn dev
.Reproduction steps
(How to reproduce the issue, if applicable)
Verification steps
(How to verify changes)
None
remains selected.As an Author I have considered π€
Check all that apply