diff --git a/CHANGELOG.md b/CHANGELOG.md index ace50817c5..c2cdc1c724 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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.** diff --git a/app/views/contributors/index.html.erb b/app/views/contributors/index.html.erb index ddd3911313..3a6df98745 100644 --- a/app/views/contributors/index.html.erb +++ b/app/views/contributors/index.html.erb @@ -29,8 +29,10 @@

<%= _("No contributors have been defined.") %>

<% 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 %> <% end %>