-
Notifications
You must be signed in to change notification settings - Fork 367
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
upcoming: [M3-7481] - Disable creating and editing API tokens for proxy users #10109
upcoming: [M3-7481] - Disable creating and editing API tokens for proxy users #10109
Conversation
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.
All the verification steps looked good. Thanks for including the test!
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 is great, thanks for the tests @mjac0bs! This made me realize I missed this flow when I wrote up the test tickets for this project, I appreciate you covering it here!
cy.findByRole('tooltip') | ||
.should('be.visible') | ||
.within(() => { | ||
cy.findByText( | ||
'You can only create tokens for your own company.' | ||
).should('be.visible'); | ||
}); |
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.
cy.findByRole('tooltip') | |
.should('be.visible') | |
.within(() => { | |
cy.findByText( | |
'You can only create tokens for your own company.' | |
).should('be.visible'); | |
}); | |
ui.tooltip | |
.findByText('You can only create tokens for your own company.') | |
.should('be.visible'); |
Just pointing out that this exists for the future!
The helper is a little bit more ergonomic, and has the extra advantage of working from inside within(() => {})
callbacks even though the tooltip itself is often somewhere else in the DOM (not applicable to your situation of course)
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, thanks! I appreciate the reminder that these UI helpers exist; made that quick change in 3a35491.
Description 📝
According to the API spec:
Proxy users may not generate additional tokens for themselves.
Proxy users will be able to view the tokens provisioned for them, but will not be able to modify them.
Proxy users should still be able to revoke their own PAT.
Changes 🔄
Preview 📷
How to test 🧪
Prerequisites
(How to setup test environment)
user_type
toproxy
inserverHandlers.ts
.Verification steps
(How to verify changes)
Create a Personal Access Token
is disabled and hovering over the button displays a tooltip explaining the reason for disabling.Rename
) is disabled and hovering over the help tooltip displays a message explaining the reason for disabling.As an Author I have considered 🤔
Check all that apply