This commit is contained in:
liyuchun
2022-03-29 13:45:36 +08:00
parent 0fe342e621
commit 1fcbef1a79
2 changed files with 10 additions and 1 deletions
+10
View File
@@ -2279,6 +2279,16 @@ EOD;
$module = strtolower($module);
$method = strtolower($method);
/* If the user is doing a tutorial, have all tutorial privs. */
if(defined('TUTORIAL'))
{
$app->loadLang('tutorial');
foreach($lang->tutorial->tasks as $task)
{
if($task['nav']['module'] == $module and $task['nav']['method'] = $method) return true;
}
}
/* Check the parent object is closed. */
if(!empty($method) and strpos('close|batchclose', $method) === false and !commonModel::canBeChanged($module, $object)) return false;
-1
View File
@@ -76,7 +76,6 @@
<?php
if(isset($task['mode']) && $task['mode'] != $mode) continue;
$nav = $task['nav'];
if(!commonModel::hasPriv($nav['module'], $nav['method'])) continue;
$task['name'] = $name;
$task['id'] = ++ $idx;
$task['url'] = helper::createLink($nav['module'], $nav['method'], isset($nav['vars']) ? $nav['vars'] : '', 'tutorial');