From ac39c2b60232c708865e7bb4d3623ce3d3424bb2 Mon Sep 17 00:00:00 2001 From: Hagen Schink Date: Fri, 1 Aug 2014 10:37:19 +0200 Subject: [PATCH] Show parent link only if parent is visible to user --- lib/api/v3/work_packages/work_package_representer.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/api/v3/work_packages/work_package_representer.rb b/lib/api/v3/work_packages/work_package_representer.rb index fc4d0e7160..0dcbc59979 100644 --- a/lib/api/v3/work_packages/work_package_representer.rb +++ b/lib/api/v3/work_packages/work_package_representer.rb @@ -129,7 +129,7 @@ module API { href: "#{root_url}/api/v3/work_packages/#{represented.work_package.parent.id}", title: represented.work_package.parent.subject - } unless represented.work_package.parent.nil? + } unless represented.work_package.parent.nil? || !represented.work_package.parent.visible? end links :children do