Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Fix tests

Christophe Bliard9edada09fd0a
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index bfb79a9c77d..269cd465826 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -232,9 +232,8 @@ class ApplicationController < ActionController::Base
# Authorize the user for the requested controller action.
# To be used in before_action hooks
- def authorize
- action = { controller: params[:controller], action: params[:action] }
- do_authorize(action, global: false)
+ def authorize(ctrl = params[:controller], action = params[:action])
+ do_authorize({ controller: ctrl, action: }, global: false)
end
# Authorize the user for the requested controller action outside a project
@@ -260,6 +259,7 @@ class ApplicationController < ActionController::Base
deny_access
end
end
+ is_authorized
end
# Find project of id params[:id]