From 3131ed0948fecf486e88842544b53d4817970d28 Mon Sep 17 00:00:00 2001 From: zmagod Date: Fri, 16 Mar 2018 17:30:49 +0100 Subject: [PATCH] adds permission check to archived project actions dropdown [fixes SCI-2194] --- app/views/projects/archive/_project.html.erb | 38 +++++++++++-------- .../projects/archive/_team_projects.html.erb | 2 +- 2 files changed, 24 insertions(+), 16 deletions(-) diff --git a/app/views/projects/archive/_project.html.erb b/app/views/projects/archive/_project.html.erb index 4b9ddfd74..b382e4644 100644 --- a/app/views/projects/archive/_project.html.erb +++ b/app/views/projects/archive/_project.html.erb @@ -1,20 +1,28 @@
- - + <% if can_restore_project?(project) %> + + <% end %>

<% if project.hidden? then %> diff --git a/app/views/projects/archive/_team_projects.html.erb b/app/views/projects/archive/_team_projects.html.erb index c884b57b9..d15b74bba 100644 --- a/app/views/projects/archive/_team_projects.html.erb +++ b/app/views/projects/archive/_team_projects.html.erb @@ -3,7 +3,7 @@
<% projects.each_index do |i| project = projects[i] %>
- <%= render partial: "projects/archive/project", locals: {project: project} %> + <%= render partial: "projects/archive/project", locals: { project: project } %>
<% if (i+1) % 4 == 0 %>