* [bug#49218,done,0.1h] check batch action privilege.

This commit is contained in:
tianshujie
2024-06-13 01:13:30 +00:00
committed by 王怡栋
parent fe2959dc37
commit db22aaaa3d
2 changed files with 9 additions and 0 deletions
+1
View File
@@ -1135,6 +1135,7 @@ class task extends control
$this->view->orderBy = $orderBy;
$this->view->type = $type;
$this->view->executionID = $executionID;
$this->view->execution = $execution;
$this->display();
}
+8
View File
@@ -8,4 +8,12 @@ declare(strict_types=1);
* @package task
* @link https://www.zentao.net
*/
namespace zin;
include '../../file/ui/export.html.php';
$canBatchEdit = common::hasPriv('task', 'batchEdit', !empty($execution) ? $execution : null);
$canBatchClose = common::hasPriv('task', 'batchClose', !empty($execution) ? $execution : null) && strtolower($type) != 'closed';
$canBatchCancel = common::hasPriv('task', 'batchCancel', !empty($execution) ? $execution : null) && strtolower($type) != 'cancel';
$canBatchAssignTo = common::hasPriv('task', 'batchAssignTo', !empty($execution) ? $execution : null);
$canBatchChangeModule = common::hasPriv('task', 'batchChangeModule', !empty($execution) ? $execution : null);
$canBatchAction = in_array(true, array($canBatchEdit, $canBatchClose, $canBatchCancel, $canBatchChangeModule, $canBatchAssignTo));