diff --git a/module/task/model.php b/module/task/model.php index 1d34f6848b..309334d40c 100755 --- a/module/task/model.php +++ b/module/task/model.php @@ -2140,10 +2140,8 @@ class taskModel extends model { $action = strtolower($action); - /* 执行不可修改的话,任务也不可修改。 */ - global $dao; - $execution = $dao->findById($task->execution)->from(TABLE_EXECUTION)->fetch(); - if(!common::canModify('execution', $execution)) return false; + /* 任务不可修改的话,则无法进行操作。 */ + if(!common::canModify('task', $task)) return false; /* 父任务只能编辑和创建子任务。 Parent task only can edit task and create children. */ if((!empty($task->isParent) || $task->parent < 0) && !in_array($action, array('edit', 'batchcreate', 'cancel'))) return false;