From c162d8e4691ffaad7fe97eb8a646b83b14dc95b2 Mon Sep 17 00:00:00 2001 From: Robert-Anthony Lee-Faison <108823963+leefaisonr@users.noreply.github.com> Date: Fri, 13 Dec 2024 10:33:36 -0500 Subject: [PATCH] Allow Edit bttn to be visible for SysAdmin user (#1128) --- app/views/projects/show.html.erb | 2 +- spec/system/project_show_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/projects/show.html.erb b/app/views/projects/show.html.erb index 4d9027a42..b0a4c7034 100644 --- a/app/views/projects/show.html.erb +++ b/app/views/projects/show.html.erb @@ -51,7 +51,7 @@

Project Description <%# Per ticket #1114 only superusers have edit access %> - <% if @project_eligible_to_edit && current_user.superuser %> + <% if @project_eligible_to_edit && current_user.superuser || current_user.sysadmin %> <%= link_to "Edit", edit_project_path(@project.id), id:"revisible-heading", class: "btn btn-primary btn-sm" %> <% end %>

diff --git a/spec/system/project_show_spec.rb b/spec/system/project_show_spec.rb index 5ccace130..53b055329 100644 --- a/spec/system/project_show_spec.rb +++ b/spec/system/project_show_spec.rb @@ -98,7 +98,7 @@ expect(page).to have_content(project_not_in_mediaflux.title) expect(page).to have_content(pending_text) expect(page).to have_css ".pending" - expect(page).not_to have_link("Edit") + expect(page).to have_link("Edit") expect(page).to have_selector(:link_or_button, "Approve Project") end end