-
Notifications
You must be signed in to change notification settings - Fork 364
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-8590] - Restrict access to Database Create page for restricted users #11137
fix: [M3-8590] - Restrict access to Database Create page for restricted users #11137
Conversation
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.
Access to Database Create page restricted appropriately for restricted users with no adverse impact on non-restricted users ✅
We'll want to get a changeset added for this PR
@@ -570,6 +590,8 @@ const DatabaseCreate = () => { | |||
}} | |||
className={classes.selectPlanPanel} | |||
data-qa-select-plan | |||
disabled={isRestricted} | |||
disabledTabs={isRestricted ? ['shared', 'dedicated'] : []} |
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 would be in favor in getting right of this line, right now there's odd behavior where you can click "Premium CPU" as a restricted user but not be able to click back to the "Dedicated CPU" tab.
Even without this line, a restricted user wouldn't be able to select a plan, and the only way they'd even be able to reach the page is by navigating to it directly.
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.
Updated
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.
Looks good - error message is visible for restricted users and form fields are disabled.
Other than Dajahi's comments (we can categorize a Changed
changeset), this should be good to go. Thanks @zaenab-akamai!
Added the changeset. I missed this - thanks for pointing it out @dwiley-akamai ! |
Coverage Report: ✅ |
@zaenab-akamai Good call on Fixed since there was a previous PR for this. That works for me. 👍🏼 |
Cloud Manager E2E Run #6736
Run Properties:
|
Project |
Cloud Manager E2E
|
Branch Review |
develop
|
Run status |
Passed #6736
|
Run duration | 26m 18s |
Commit |
b5da866ae2: fix: [M3-8590] - Restrict access to Database Create page for restricted users (#...
|
Committer | zaenab-akamai |
View all properties for this run ↗︎ |
Test results | |
---|---|
Failures |
0
|
Flaky |
2
|
Pending |
2
|
Skipped |
0
|
Passing |
445
|
View all changes introduced in this branch ↗︎ |
Description 📝
Discovered during release testing for v1.128.0:
A recent PR updated the UI for users who have restricted access (read only or no access) to Databases: #10794
This included disabling buttons and providing helper tooltip text to explain the reason why restricted users couldn't access these features.
The PR did not include the same treatment for the databases/create page, which a restricted user can still navigate to via the URL (https://cloud.linode.com/databases/create) or via the top menu's Create button. The restricted user is able to fill out the form and submit it, and only then do they receive an error.
Thank you @mjac0bs for your inputs! :)
Changes 🔄
List any change relevant to the reviewer.
Target release date 🗓️
NA
Preview 📷
How to test 🧪
Reproduction steps
Verification steps
Pull the PR, login as a restricted.
Navigate to /databases/create via the URL or via the top menu. The form should be disabled and an error notice should appear on top.
As an Author I have considered 🤔
Check all that apply