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

Disable cops

Klaus Zanders8cd4f8cae58c
diff --git a/app/controllers/shares_controller.rb b/app/controllers/shares_controller.rb
index 7e0e2d140b7..60511ca50ad 100644
--- a/app/controllers/shares_controller.rb
+++ b/app/controllers/shares_controller.rb
@@ -303,7 +303,7 @@ class SharesController < ApplicationController
respond_with_turbo_streams
end
- def load_entity
+ def load_entity # rubocop:disable Metrics/AbcSize
@entity = if params["work_package_id"]
WorkPackage.visible.find(params["work_package_id"])
elsif params["project_query_id"]
@@ -360,7 +360,7 @@ class SharesController < ApplicationController
.where(id: params[:share_ids])
end
- def available_roles
+ def available_roles # rubocop:disable Metrics/AbcSize
@available_roles ||= if @entity.is_a?(WorkPackage)
role_mapping = WorkPackageRole.unscoped.pluck(:builtin, :id).to_h
@@ -377,6 +377,7 @@ class SharesController < ApplicationController
default: true }
]
elsif @entity.is_a?(ProjectQuery)
+ # TODO: Load all roles here and see where we can load the description from
role_mapping = ProjectQueryRole.unscoped.pluck(:builtin, :id).to_h
[