From e7bbfe300cb50eb6f2e34aed77b54c721e21c78d Mon Sep 17 00:00:00 2001 From: liumengyi Date: Wed, 24 Aug 2022 16:26:06 +0800 Subject: [PATCH 1/2] * Fix bug #26839. --- module/action/model.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/module/action/model.php b/module/action/model.php index 66ba694f52..c3e5577349 100755 --- a/module/action/model.php +++ b/module/action/model.php @@ -1540,7 +1540,11 @@ class actionModel extends model if($action->objectType == 'story') { $story = $this->loadModel('story')->getByID($action->objectID); - if(!empty($story)) $moduleName = $story->type; + if(!empty($story)) + { + $moduleName = $story->type; + $action->objectLink = helper::createLink('story', 'view', "id=$story->id&version=0¶m=0&storyType=$story->type"); + } } if($action->objectType == 'doclib') From 151ba868382d542dde7c59d5aeb419ae13d4b8e7 Mon Sep 17 00:00:00 2001 From: liumengyi Date: Wed, 24 Aug 2022 16:26:31 +0800 Subject: [PATCH 2/2] * Fix bug #26838. --- module/story/model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/story/model.php b/module/story/model.php index 2b2fecab0c..3065c5edbf 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -4578,7 +4578,7 @@ class storyModel extends model $executionID = empty($execution) ? $this->session->execution : $execution->id; $account = $this->app->user->account; $storyLink = helper::createLink('story', 'view', "storyID=$story->id&version=0¶m=0&storyType=$story->type"); - $canView = common::hasPriv('story', 'view'); + $canView = common::hasPriv($story->type, 'view', null, "storyType=$story->type"); if($tab == 'project') {