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

Allow user_action filtered by move_work_packages

Oliver Günther6cfe0d33fbc6
diff --git a/app/views/work_packages/moves/new.html.erb b/app/views/work_packages/moves/new.html.erb
index e1899ddf98b..7c3bf34af1e 100644
--- a/app/views/work_packages/moves/new.html.erb
+++ b/app/views/work_packages/moves/new.html.erb
@@ -60,7 +60,7 @@ See COPYRIGHT and LICENSE files for more details.
<div class="form--field-container">
<%= angular_component_tag 'op-project-autocompleter',
inputs: {
- # apiFilters: [['user_action', '=', ['work_packages/move']]],
+ apiFilters: [['user_action', '=', ['work_packages/move']]],
name: 'new_project_id',
},
id: 'new_project_id',
diff --git a/config/initializers/permissions.rb b/config/initializers/permissions.rb
index 676c267fa19..cb405f83d13 100644
--- a/config/initializers/permissions.rb
+++ b/config/initializers/permissions.rb
@@ -155,7 +155,8 @@ OpenProject::AccessControl.map do |map|
wpt.permission :move_work_packages,
{ 'work_packages/moves': %i[new create] },
require: :loggedin,
- dependencies: :view_work_packages
+ dependencies: :view_work_packages,
+ contract_actions: { work_packages: %i[move] }
wpt.permission :add_work_package_notes,
{