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

Simplify check to determien role

Klaus Zanders448470227038
diff --git a/app/models/sharing_strategies/project_query_strategy.rb b/app/models/sharing_strategies/project_query_strategy.rb
index 3eafc855865..bdfd7f7059b 100644
--- a/app/models/sharing_strategies/project_query_strategy.rb
+++ b/app/models/sharing_strategies/project_query_strategy.rb
@@ -98,7 +98,7 @@ module SharingStrategies
end
def owner_role_identifier
- if !entity.public? || entity.user.allowed_globally?(:manage_public_project_queries)
+ if entity.editable?(entity.user)
Role::BUILTIN_PROJECT_QUERY_EDIT
else
Role::BUILTIN_PROJECT_QUERY_VIEW