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

fix: avoid requesting validation endpoint when no permission #10085

Merged
merged 3 commits into from
May 17, 2024

Conversation

anshul45
Copy link
Contributor

Closes: (#9327)

Description:

Fix the project validation details request if the user does not have permission to do so. I've figured out how it's validated on the Backend. Based on this. I've validate the user on the Frontend before making the validation request.

Reviewer actions

  • I have manually tested the changes in the preview environment
  • I have reviewed the code
  • I understand that "request changes" will block this PR from merging

Copy link

netlify bot commented May 15, 2024

👷 Deploy request for peaceful-bassi-cbf284 pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit b003a4f

@joaoviana joaoviana self-requested a review May 17, 2024 08:10
@joaoviana joaoviana self-assigned this May 17, 2024
@owlas owlas requested a deployment to duplicate_Fix-getting-project-validation - jaffle_db_pg_13 PR #10099 May 17, 2024 08:16 — with Render Abandoned
@owlas owlas deployed to duplicate_Fix-getting-project-validation - headless-browser PR #10099 May 17, 2024 08:16 — with Render Active
@joaoviana joaoviana changed the title fix: Some users are requesting validation details even though they do… fix: avoid requesting validation endpoint when no permission May 17, 2024
@joaoviana
Copy link
Contributor

Just changed the description of the PR @anshul45, reviewing this now, and running E2E tests 👍

@owlas owlas temporarily deployed to duplicate_Fix-getting-project-validation - lightdash PR #10099 May 17, 2024 08:28 — with Render Destroyed
@joaoviana
Copy link
Contributor

Pushed 2 changes here @anshul45

  1. Simplified the useValidation hook and renamed the boolean check variable to be clearer
  2. Added user to the other place in the app where this hook is called. I recommend running the proper yarn commands to do the type checking. For example yarn workspace frontend build 👍

Will merge once this passes E2E tests!

@joaoviana
Copy link
Contributor

Thank you for contributing to Lightdash 🎉

@joaoviana
Copy link
Contributor

@all-contributors add @anshul45 for code

@joaoviana joaoviana merged commit d69c677 into lightdash:main May 17, 2024
52 of 57 checks passed
Copy link
Contributor

@joaoviana

I've put up a pull request to add @anshul45! 🎉

lightdash-bot pushed a commit that referenced this pull request May 17, 2024
# [0.1097.0](0.1096.6...0.1097.0) (2024-05-17)

### Bug Fixes

* avoid requesting validation endpoint when no permission ([#10085](#10085)) ([d69c677](d69c677))

### Features

* custom sql dimension filters ([#10103](#10103)) ([4094eb2](4094eb2))
@lightdash-bot
Copy link
Collaborator

🎉 This PR is included in version 0.1097.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@anshul45
Copy link
Contributor Author

@joaoviana Thank you for taking the time to review my pull request and optimize my code! I have learned a lot from this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants