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 usage of `intersect?` on the Array intead of the relation

Klaus Zanders1b8a7a8ff304
diff --git a/lib/api/root_api.rb b/lib/api/root_api.rb
index 0ddef5dca33..94af97c68b4 100644
--- a/lib/api/root_api.rb
+++ b/lib/api/root_api.rb
@@ -154,7 +154,7 @@ module API
authorized = permissions.any? do |permission|
allowed_projects = Project.allowed_to(user, permission)
- allowed_projects.intersect?(projects)
+ projects.intersect?(allowed_projects)
end
authorize_by_with_raise(authorized, &block)