diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2018-12-02 11:23:10 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2018-12-02 11:23:10 +0000 |
commit | 3ba51f205df5560ebaf101d0282084d22e1f0a26 (patch) | |
tree | 9cadfc2c1f2a229685eee3fef0b02c6f5cb83617 /app | |
parent | 12d1372ae54b0bfeeef6ce868a7ad153b391706c (diff) | |
download | redmine-3ba51f205df5560ebaf101d0282084d22e1f0a26.tar.gz redmine-3ba51f205df5560ebaf101d0282084d22e1f0a26.zip |
Let admins unarchive the project when trying to access an archived project (#29993).
git-svn-id: http://svn.redmine.org/redmine/trunk@17682 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/application_controller.rb | 1 | ||||
-rw-r--r-- | app/views/common/error.html.erb | 5 |
2 files changed, 6 insertions, 0 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index a71103a89..94f435948 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -259,6 +259,7 @@ class ApplicationController < ActionController::Base true else if @project && @project.archived? + @archived_project = @project render_403 :message => :notice_not_authorized_archived_project elsif @project && !@project.allows_to?(:controller => ctrl, :action => action) # Project module is disabled diff --git a/app/views/common/error.html.erb b/app/views/common/error.html.erb index a5ec39c3a..04b4b0377 100644 --- a/app/views/common/error.html.erb +++ b/app/views/common/error.html.erb @@ -3,6 +3,11 @@ <% if @message.present? %> <p id="errorExplanation"><%= @message %></p> <% end %> + +<% if @archived_project && User.current.admin? %> + <p><%= link_to l(:button_unarchive), unarchive_project_path(@archived_project), :method => :post, :class => 'icon icon-unlock' %></p> +<% end %> + <p><a href="javascript:history.back()"><%= l(:button_back) %></a></p> <% html_title @status %> |