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 project_role? method

Klaus Zanders109ac5e64ed4
diff --git a/app/models/member.rb b/app/models/member.rb
index 877086c2d79..dd918e6d96e 100644
--- a/app/models/member.rb
+++ b/app/models/member.rb
@@ -86,7 +86,7 @@ class Member < ApplicationRecord
end
def project_role?
- entity_id.nil?
+ entity_id.nil? && project_id.present?
end
def deletable_role?(role)