From 27f06f4153b1358c0a7c3b782a3255b623b6b955 Mon Sep 17 00:00:00 2001 From: Yagami <976204163@qq.com> Date: Thu, 12 Jul 2018 10:25:19 +0800 Subject: [PATCH] *Fix bugs. --- module/bug/view/batchcreate.html.php | 2 +- module/common/model.php | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/module/bug/view/batchcreate.html.php b/module/bug/view/batchcreate.html.php index d908ec85fa..015e6438f3 100644 --- a/module/bug/view/batchcreate.html.php +++ b/module/bug/view/batchcreate.html.php @@ -48,7 +48,7 @@ idAB;?> '> product->branch;?> - bug->module;?> + bug->module;?> '>bug->project;?> bug->openedBuild;?> bug->title;?> diff --git a/module/common/model.php b/module/common/model.php index 77ba607de0..e00cf62357 100644 --- a/module/common/model.php +++ b/module/common/model.php @@ -1351,19 +1351,18 @@ EOD; if($module == 'effort' and ($method == 'batchcreate' or $method == 'createforobject')) return true; // limited project + $limitedProject = false; if(!empty($module) && $module == 'task' && !empty($object->project) or !empty($module) && $module == 'project' && !empty($object->id)) { - $limitedProject = false; $objectID = ''; if(!empty($object->id)) $objectID = $object->id; if(!empty($object->id) && !empty($object->project)) $objectID = $object->project; $limitedProjects = !empty($_SESSION['limitedProjects']) ? $_SESSION['limitedProjects'] : ''; if(strpos(",{$limitedProjects},", ",$objectID,") !== false) $limitedProject = true; - if(empty($app->user->rights['rights']['my']['limited']) && !$limitedProject) return true; } - if(empty($app->user->rights['rights']['my']['limited'])) return true; + if(empty($app->user->rights['rights']['my']['limited']) && !$limitedProject) return true; if(!is_null($method) && strpos($method, 'batch') === 0) return false; if(!is_null($method) && strpos($method, 'link') === 0) return false;