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

The users own share is not editable

Klaus Zanderse4efb6ffead6
diff --git a/app/components/shares/permission_button_component.html.erb b/app/components/shares/permission_button_component.html.erb
index 133373a5578..dcbae570f5f 100644
--- a/app/components/shares/permission_button_component.html.erb
+++ b/app/components/shares/permission_button_component.html.erb
@@ -6,7 +6,7 @@
dynamic_label: true,
anchor_align: :end,
color: :subtle }.deep_merge(@system_arguments))) do |menu|
- menu.with_show_button(disabled: !strategy.manageable?, data: { 'shares--bulk-selection-target': 'userRowRole',
+ menu.with_show_button(disabled: !editable?, data: { 'shares--bulk-selection-target': 'userRowRole',
'share-id': share.id,
'active-role-name': permission_name(active_role.id)}) do |button|
button.with_trailing_action_icon(icon: :"triangle-down")
diff --git a/app/components/shares/permission_button_component.rb b/app/components/shares/permission_button_component.rb
index 6c0527cf178..050d6094fe3 100644
--- a/app/components/shares/permission_button_component.rb
+++ b/app/components/shares/permission_button_component.rb
@@ -92,5 +92,9 @@ module Shares
["tooltip--left"]
end
+
+ def editable?
+ strategy.manageable? && share.principal != User.current
+ end
end
end