diff --git a/lib/zin/wg/storyrelatedlist/v1.php b/lib/zin/wg/storyrelatedlist/v1.php index ecb389a90b..8cae2a7267 100644 --- a/lib/zin/wg/storyrelatedlist/v1.php +++ b/lib/zin/wg/storyrelatedlist/v1.php @@ -99,7 +99,7 @@ class storyRelatedList extends relatedList 'onRender' => function($item, $linkedStory) use($storyProducts, $story, $app) { $storyID = $linkedStory->id; - $hasPriv = ($app->user->admin || str_contains(",{$app->user->view->products},", ",{$storyProducts[$story->id]},")); + $hasPriv = ($app->user->admin || str_contains(",{$app->user->view->products},", ",{$storyProducts[$storyID]},")); $item['url'] = $hasPriv ? createLink('story', 'view', "storyID=$storyID&version=0¶m=0&storyType=$story->type") : false; if($hasPriv) {