-
Notifications
You must be signed in to change notification settings - Fork 361
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
feat: [M3-7685] - Show empty Kubernetes landing page with disabled create button for restricted users #10756
feat: [M3-7685] - Show empty Kubernetes landing page with disabled create button for restricted users #10756
Conversation
…eate button for restricted users
@@ -9,6 +9,7 @@ export const grantTypeMap = { | |||
firewall: 'Firewalls', | |||
image: 'Images', | |||
linode: 'Linodes', | |||
lkeCluster: 'Clusters', |
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.
I think this code comment will bring some clarity that it's mainly used to improve UX
lkeCluster: 'Clusters', | |
lkeCluster: 'Clusters', // Note: Not included in the user's grants returned from the API. |
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.
Nit: Can we also rename this to lke: LKE Clusters
?
it('should have the "Create Cluster" button disabled for restricted users', () => { | ||
queryMocks.useProfile.mockReturnValue({ data: { restricted: true } }); | ||
|
||
const { container } = render(wrapWithTheme(<KubernetesLanding />)); |
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.
We should be able to use renderWithTheme
in these tests instead of render(wrapWithTheme())
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 @jaalah-akamai, I've updated the PR as you suggested
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 create kubernetes button disabled for restricted user
✅ confirmed button not disabled for non restricted user
✅ confirmed new landing page tests pass on local
Approving pending comments addressed
Coverage Report: ✅ |
feat: [M3-7685] - Show empty Kubernetes landing page with disabled create button for restricted users
Description 📝
To prevent unauthorized access to specific flows and provide clearer guidance, we aim to introduce notifications on landing pages, restricting entry to users without the required permissions.
The existing "Unauthorized" view for restricted users on https://cloud.linode.com/kubernetes/clusters has been replaced with the empty Kubernetes landing page, with the "Create Cluster" button disabled.
Changes 🔄
Target release date 🗓️
NA
Preview 📷
Include a screenshot or screen recording of the change
💡 Use
<video src="" />
tag when including recordings in table.Verification steps
Additionally, check if the same view is enabled for a user with full access
As an Author I have considered 🤔
Check all that apply