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: Scope the shares for the user to those for the current work package

Aaron Contreras50fff3fd48cc
diff --git a/app/components/work_packages/share/modal_body_component.html.erb b/app/components/work_packages/share/modal_body_component.html.erb
index d3c23d08325..96326b520c0 100644
--- a/app/components/work_packages/share/modal_body_component.html.erb
+++ b/app/components/work_packages/share/modal_body_component.html.erb
@@ -31,7 +31,7 @@
end
shared_users.each do |user|
- share = user.work_package_shares.first
+ share = user.work_package_shares.where(entity: @work_package).first
invited_user_list.with_row(data: { 'test-selector': "op-share-wp-active-user-#{user.id}" }) do
grid_layout('op-share-wp-modal-body--user-row', tag: :div, align_items: :center, classes: 'ellipsis') do |user_row_grid|