Skip to content
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-7686] - Restricted access UX for Databases #10794

Conversation

zaenab-akamai
Copy link
Contributor

@zaenab-akamai zaenab-akamai commented Aug 19, 2024

Description 📝

To prevent unauthorized access to specific flows and provide clearer guidance, we aim to restrict entry to users without the required permissions.

The views under /databases have been updated to disable controls for restricted users

Changes 🔄

  • "Create Database Cluster" button on the landing page (with or without entries) is disabled for users without "add_databases" access
  • All buttons & inputs in the Summary, Backups, Resize, Settings tabs under Database details have been disabled for users with "read_only" access
  • Added a notification for restricted access users on the database details page

Target release date 🗓️

NA

Preview 📷

Before After
before_databases_restricted_ux.mov
after_database_restricted_ux.mov
Screenshot 2024-08-20 at 10 12 41 AM Screenshot 2024-08-20 at 10 13 07 AM

How to test 🧪

Verification steps

  1. Login as a user with full access and add databases. Grant read_only permissions to these new resources to the restricted user
  2. Login as the restricted user and navigate to the databases page. The "Create Database Cluster" button should be disabled
  3. Navigate to the details page for any database - You should see a notification. Besides that, all form inputs, buttons should be disabled.
  4. Login again as the user with unrestricted access and remove all access to all the databases for the restricted user. Login as the restricted user - the empty landing page for Databases should have the create button disabled.

As an Author I have considered 🤔

Check all that apply

  • 👀 Doing a self review
  • ❔ Our contribution guidelines
  • 🤏 Splitting feature into small PRs
  • ➕ Adding a changeset
  • 🧪 Providing/Improving test coverage
  • 🔐 Removing all sensitive information from the code and PR description
  • 🚩 Using a feature flag to protect the release
  • 👣 Providing comprehensive reproduction steps
  • 📑 Providing or updating our documentation
  • 🕛 Scheduling a pair reviewing session
  • 📱 Providing mobile support
  • ♿ Providing accessibility support

@zaenab-akamai zaenab-akamai marked this pull request as ready for review August 20, 2024 04:57
@zaenab-akamai zaenab-akamai requested a review from a team as a code owner August 20, 2024 04:57
@zaenab-akamai zaenab-akamai requested review from jdamore-linode, bnussman-akamai and jaalah-akamai and removed request for a team August 20, 2024 04:57
@zaenab-akamai zaenab-akamai added the Restricted User Access Improve UX surrounding restricted access to features label Aug 20, 2024
Copy link
Member

@bnussman-akamai bnussman-akamai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look good!

Should we also disable the "Remove" buttons on Access Controls when the user has read-only permission?

Screenshot 2024-08-26 at 10 11 04 AM

@zaenab-akamai
Copy link
Contributor Author

Changes look good!

Should we also disable the "Remove" buttons on Access Controls when the user has read-only permission?

Screenshot 2024-08-26 at 10 11 04 AM

Hi Banks, thanks for pointing this out! I've updated the PR

Copy link

github-actions bot commented Aug 27, 2024

Coverage Report:
Base Coverage: 86.15%
Current Coverage: 86.16%

}

export const DatabaseBackups = (props: Props) => {
const { disabled = false } = props;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is more of a style thing, but we can probably remove the = false in most, if not all cases, and have the same behavior.

All of our components are enabled by default, so passing disabled={undefined} would keep them enabled, making = false not necessary.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree - looks much neater without it. I've updated the PR

@bnussman-akamai bnussman-akamai added Add'tl Approval Needed Waiting on another approval! Restricted User Access Improve UX surrounding restricted access to features and removed Restricted User Access Improve UX surrounding restricted access to features Ready for Review labels Aug 27, 2024
Copy link
Contributor

@jdamore-linode jdamore-linode left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 to Banks's suggestion, but otherwise looks good! Thanks @zaenab-akamai!

@mjac0bs mjac0bs added Approved Multiple approvals and ready to merge! and removed Add'tl Approval Needed Waiting on another approval! labels Sep 3, 2024
@jaalah-akamai jaalah-akamai merged commit 7222f52 into linode:develop Sep 5, 2024
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Approved Multiple approvals and ready to merge! Restricted User Access Improve UX surrounding restricted access to features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants