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

[#55581] show email if allowed to do so

Tobias Dillmann277b9dc75a5e
diff --git a/app/components/users/hover_card_component.rb b/app/components/users/hover_card_component.rb
index 639886e97cb..21cf2603a28 100644
--- a/app/components/users/hover_card_component.rb
+++ b/app/components/users/hover_card_component.rb
@@ -11,8 +11,7 @@ class Users::HoverCardComponent < ApplicationComponent
end
def show_email?
- # TODO: permission
- true
+ (@user == User.current) || User.current.allowed_globally?(:view_user_email)
end
# Constructs a string in the form of: