mirror of
https://github.com/redmine/redmine.git
synced 2026-05-07 15:07:14 +02:00
Adds favorites and recently used projects lists to project jump box (#31355).
Patch by Jens Krämer. git-svn-id: http://svn.redmine.org/redmine/trunk@18181 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -57,6 +57,7 @@ class ApplicationController < ActionController::Base
|
||||
end
|
||||
|
||||
before_action :session_expiration, :user_setup, :check_if_login_required, :set_localization, :check_password_change
|
||||
after_action :record_project_usage
|
||||
|
||||
rescue_from ::Unauthorized, :with => :deny_access
|
||||
rescue_from ::ActionView::MissingTemplate, :with => :missing_template
|
||||
@@ -403,6 +404,13 @@ class ApplicationController < ActionController::Base
|
||||
end
|
||||
end
|
||||
|
||||
def record_project_usage
|
||||
if @project && @project.id && User.current.logged? && User.current.allowed_to?(:view_project, @project)
|
||||
Redmine::ProjectJumpBox.new(User.current).project_used(@project)
|
||||
end
|
||||
true
|
||||
end
|
||||
|
||||
def back_url
|
||||
url = params[:back_url]
|
||||
if url.nil? && referer = request.env['HTTP_REFERER']
|
||||
|
||||
Reference in New Issue
Block a user