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
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
Disable cops
Klaus Zanders8cd4f8cae58c
diff --git a/app/controllers/shares_controller.rb b/app/controllers/shares_controller.rbindex 7e0e2d140b7..60511ca50ad 100644--- a/app/controllers/shares_controller.rb+++ b/app/controllers/shares_controller.rb@@ -303,7 +303,7 @@ class SharesController < ApplicationControllerrespond_with_turbo_streamsend- 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 < ApplicationControllerdefault: true }]elsif @entity.is_a?(ProjectQuery)+ # TODO: Load all roles here and see where we can load the description fromrole_mapping = ProjectQueryRole.unscoped.pluck(:builtin, :id).to_h[