diff --git a/module/execution/view/kanban.html.php b/module/execution/view/kanban.html.php index 72708628ba..05e5e217a9 100644 --- a/module/execution/view/kanban.html.php +++ b/module/execution/view/kanban.html.php @@ -58,9 +58,9 @@ $canDeleteRegion = commonModel::hasPriv('kanban', 'deleteRegion'); $canCreateLane = commonModel::hasPriv('kanban', 'createLane'); $canCreateTask = common::hasPriv('task', 'create'); $canBatchCreateTask = common::hasPriv('task', 'batchCreate'); -$canCreateBug = common::hasPriv('bug', 'create'); -$canBatchCreateBug = common::hasPriv('bug', 'batchCreate'); -$canImportBug = common::hasPriv('execution', 'importBug'); +$canCreateBug = ($productID and common::hasPriv('bug', 'create')); +$canBatchCreateBug = ($productID and common::hasPriv('bug', 'batchCreate')); +$canImportBug = ($productID and common::hasPriv('execution', 'importBug')); $canCreateStory = ($productID and common::hasPriv('story', 'create')); $canBatchCreateStory = ($productID and common::hasPriv('story', 'batchCreate')); $canLinkStory = ($productID and common::hasPriv('execution', 'linkStory')); diff --git a/module/execution/view/taskkanban.html.php b/module/execution/view/taskkanban.html.php index 2f4a0d4a2a..8be39bc3c1 100644 --- a/module/execution/view/taskkanban.html.php +++ b/module/execution/view/taskkanban.html.php @@ -78,9 +78,9 @@ $checkObject->execution = $executionID; $canCreateTask = common::hasPriv('task', 'create', $checkObject); $canBatchCreateTask = common::hasPriv('task', 'batchCreate', $checkObject); - $canCreateBug = common::hasPriv('bug', 'create'); - $canBatchCreateBug = common::hasPriv('bug', 'batchCreate'); - $canImportBug = common::hasPriv('execution', 'importBug'); + $canCreateBug = ($productID and common::hasPriv('bug', 'create')); + $canBatchCreateBug = ($productID and common::hasPriv('bug', 'batchCreate')); + $canImportBug = ($productID and common::hasPriv('execution', 'importBug')); $canCreateStory = ($productID and common::hasPriv('story', 'create')); $canBatchCreateStory = ($productID and common::hasPriv('story', 'batchCreate')); $canLinkStory = ($productID and common::hasPriv('execution', 'linkStory'));