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

Only Render Plan's "Add a Contributor" Button For Users With Sufficient Permissions #3442

Open
wants to merge 2 commits into
base: development
Choose a base branch
from

Conversation

aaronskiba
Copy link
Contributor

Fixes #3439

Changes proposed in this PR:

  • This PR adds a conditional to the plan's "Add a contributor" button.
    • Adding the if @plan.editable_by?(current_user.id) permission check prevents users with "Read only" access from accessing the button.

@aaronskiba aaronskiba requested a review from martaribeiro July 29, 2024 20:08
@aaronskiba aaronskiba changed the title Make a Plan's "Add a Contributor" Button Only Render For User's With Sufficient Permissions Make a Plan's "Add a Contributor" Button Only Render For Users With Sufficient Permissions Aug 6, 2024
Prior to this commit, even plan collaborators with "Read only" access could add/edit plan contributors.
@aaronskiba aaronskiba changed the title Make a Plan's "Add a Contributor" Button Only Render For Users With Sufficient Permissions Only Render Plan's "Add a Contributor" Button For Users With Sufficient Permissions Feb 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant