Skip to content

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

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

Open
wants to merge 2 commits into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
- Fixed a bug in the deep copy of plans where the old identifier was being copied into the new plan. We now copy the generated id of the new plan to the identifier field.
- Fixed bar chart click function in the Usage dashboard (GitHub issue #3443)
- Fixed broken link for the V1 API documentation.
- Only Render Plan's "Add a Contributor" Button For Users With Sufficient Permissions [#3442](https://github.com/DMPRoadmap/roadmap/pull/3442)


**Note this upgrade is mainly a migration from Bootstrap 3 to Bootstrap 5.**
Expand Down
6 changes: 4 additions & 2 deletions app/views/contributors/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,10 @@
<p><%= _("No contributors have been defined.") %></p>
<% end %>

<%= link_to _("Add a contributor"), new_plan_contributor_path(@plan),
class: "btn btn-primary" %>
<% if @plan.editable_by?(current_user.id) %>
<%= link_to _("Add a contributor"), new_plan_contributor_path(@plan),
class: "btn btn-primary" %>
<% end %>
</div>
</div>
<% end %>
Expand Down
Loading