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 the `visible?` method on the work package

Klaus Zanders4f9d514990aa
diff --git a/app/models/work_package.rb b/app/models/work_package.rb
index 3824932168b..56a443d9522 100644
--- a/app/models/work_package.rb
+++ b/app/models/work_package.rb
@@ -220,7 +220,7 @@ class WorkPackage < ApplicationRecord
# Returns true if usr or current user is allowed to view the work_package
def visible?(usr = User.current)
- usr.allowed_in_project?(:view_work_packages, project)
+ usr.allowed_in_work_package?(:view_work_packages, self)
end
# RELATIONS