* [task#130244,doing,2h] check whether the project can be modified.
This commit is contained in:
@@ -27,24 +27,25 @@ $load = $rawMethod !== 'browse' ? null : 'table';
|
||||
$product = is_bool($product) ? new stdclass() : $product;
|
||||
|
||||
$canModify = common::canModify('product', $product);
|
||||
if(!empty($project)) $canModify = $canModify && common::canModify('project', $project);
|
||||
$canSwitchCaseType = $this->app->tab == 'qa';
|
||||
$canDisplaySuite = $this->app->tab == 'qa' && $rawMethod != 'browseunits';
|
||||
$canManageModule = hasPriv('tree', 'browse') && !empty($productID) && (!isset($project) || $project->hasProduct);
|
||||
$canCreateSuite = hasPriv('testsuite', 'create');
|
||||
$canManageModule = $canModify && hasPriv('tree', 'browse') && !empty($productID) && (!isset($project) || $project->hasProduct);
|
||||
$canCreateSuite = $canModify && hasPriv('testsuite', 'create');
|
||||
$canBrowseUnits = hasPriv('testtask', 'browseunits');
|
||||
$canBrowseZeroCase = hasPriv('testcase', 'zerocase') && $rawMethod != 'browseunits';
|
||||
$canBrowseGroupCase = hasPriv('testcase', 'groupcase');
|
||||
$canAutomation = hasPriv('testcase', 'automation') && !empty($productID) && $rawMethod != 'browseunits';
|
||||
$canAutomation = $canModify && hasPriv('testcase', 'automation') && !empty($productID) && $rawMethod != 'browseunits';
|
||||
$canExport = hasPriv('testcase', 'export');
|
||||
$canExportTemplate = hasPriv('testcase', 'exportTemplate');
|
||||
$canExportXmind = hasPriv('testcase', 'exportXmind');
|
||||
$canImport = hasPriv('testcase', 'import');
|
||||
$canImportFromLib = hasPriv('testcase', 'importFromLib');
|
||||
$canImportXmind = hasPriv('testcase', 'importXmind');
|
||||
$canCreateCase = hasPriv('testcase', 'create');
|
||||
$canBatchCreateCase = $productID && hasPriv('testcase', 'batchCreate');
|
||||
$canCreateScene = $productID && hasPriv('testcase', 'createScene');
|
||||
$canImportUnitResult = hasPriv('testtask', 'importUnitResult');
|
||||
$canImport = $canModify && hasPriv('testcase', 'import');
|
||||
$canImportFromLib = $canModify && hasPriv('testcase', 'importFromLib');
|
||||
$canImportXmind = $canModify && hasPriv('testcase', 'importXmind');
|
||||
$canCreateCase = $canModify && hasPriv('testcase', 'create');
|
||||
$canBatchCreateCase = $canModify && $productID && hasPriv('testcase', 'batchCreate');
|
||||
$canCreateScene = $canModify && $productID && hasPriv('testcase', 'createScene');
|
||||
$canImportUnitResult = $canModify && hasPriv('testtask', 'importUnitResult');
|
||||
$canCreate = $canCreateCase || $canBatchCreateCase || $canCreateScene;
|
||||
|
||||
$lang->testcase->typeList[''] = $lang->testcase->allType;
|
||||
|
||||
Reference in New Issue
Block a user