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-7683] - Disable Create Image button with tooltiptext on Landing Page for restricted users #10671

Conversation

harsh-akamai
Copy link
Contributor

@harsh-akamai harsh-akamai commented Jul 11, 2024

Description 📝

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

Here, we are restricting users from creating new Image when they do not have access or have read only access.

Changes 🔄

  • For restricted users:
    • Disabled Create Image Button on the Landing Page

Target release date 🗓️

Preview 📷

Before After
07_53_12 07_52_51

How to test 🧪

Prerequisites

(How to setup test environment)

  • Log into two accounts side by side:
    • An unrestricted admin user account: full access
    • A restricted user account (use Incognito for this)
      • Start with Read Only for everything

Reproduction steps

  • Landing:
    • Observe as restricted user, notice shows and you cannot create Images

Verification steps

  • After changes, observe tooltips are tailored to the action.

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

@harsh-akamai harsh-akamai requested a review from a team as a code owner July 11, 2024 14:27
@harsh-akamai harsh-akamai requested review from hana-akamai and carrillo-erik and removed request for a team July 11, 2024 14:27
@harsh-akamai harsh-akamai self-assigned this Jul 11, 2024
@harsh-akamai harsh-akamai added Restricted User Access Improve UX surrounding restricted access to features Images Relating to Images labels Jul 11, 2024
@hkhalil-akamai hkhalil-akamai self-requested a review July 11, 2024 14:51
Copy link

github-actions bot commented Jul 11, 2024

Coverage Report:
Base Coverage: 82.48%
Current Coverage: 82.48%

@@ -93,6 +95,9 @@ export const ImagesLanding = () => {
const { enqueueSnackbar } = useSnackbar();
const flags = useFlags();
const location = useLocation();
const isRestricted = useRestrictedGlobalGrantCheck({
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: same here, I would change to isImagesReadOnly

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated the variable name.

@jaalah-akamai jaalah-akamai added the Add'tl Approval Needed Waiting on another approval! label Jul 15, 2024
Copy link
Contributor

Choose a reason for hiding this comment

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

Same comment as the previous PR about deleting this changeset.

@mjac0bs mjac0bs added Approved Multiple approvals and ready to merge! and removed Add'tl Approval Needed Waiting on another approval! labels Jul 15, 2024
Copy link
Contributor

@hana-akamai hana-akamai left a comment

Choose a reason for hiding this comment

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

We should address the image empty landing state as well

image

@harsh-akamai harsh-akamai force-pushed the feature/M3-7683-disable-landing-page-create-image-button-for-restricted-users branch from f0538b1 to 7109a00 Compare July 16, 2024 07:12
@harsh-akamai harsh-akamai merged commit b69b728 into linode:develop Jul 16, 2024
34 of 36 checks passed
@harsh-akamai harsh-akamai deleted the feature/M3-7683-disable-landing-page-create-image-button-for-restricted-users branch July 16, 2024 11:58
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! Images Relating to Images 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