Merge branch 'autotest_ly' into 'master'
Autotest ly See merge request easycorp/zentaopms!2329
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
title: table zt_userview
|
||||
desc: "可访问权限"
|
||||
author: automated export
|
||||
version: "1.0"
|
||||
fields:
|
||||
- field: account
|
||||
note: "用户名"
|
||||
fields:
|
||||
- field: account1
|
||||
range: test{100},dev{100},td{100},top{100}
|
||||
- field: account2
|
||||
range: 1-100,1-100,1-100,1-100
|
||||
- field: programs
|
||||
note: "项目集"
|
||||
range: 1-10
|
||||
prefix: ","
|
||||
postfix: ""
|
||||
format: ""
|
||||
- field: products
|
||||
note: "产品"
|
||||
range: 1-100
|
||||
prefix: ","
|
||||
postfix: ""
|
||||
format: ""
|
||||
- field: projects
|
||||
note: "项目"
|
||||
range: 11-100
|
||||
prefix: ","
|
||||
postfix: ""
|
||||
format: ""
|
||||
- field: sprints
|
||||
note: "迭代"
|
||||
range: 101-700
|
||||
prefix: ","
|
||||
postfix: ""
|
||||
format: ""
|
||||
@@ -7,6 +7,7 @@ $builder->todo = array('rows' => 2000, 'extends' => array('todo'));
|
||||
$builder->effort = array('rows' => 100, 'extends' => array('effort'));
|
||||
$builder->usergroup = array('rows' => 600, 'extends' => array('usergroup'));
|
||||
$builder->usercontact = array('rows' => 61, 'extends' => array('usercontact'));
|
||||
$builder->userview = array('rows' => 400, 'extends' => array('userview'));
|
||||
$builder->dept = array('rows' => 100, 'extends' => array('dept'));
|
||||
$builder->action = array('rows' => 100, 'extends' => array('action'));
|
||||
|
||||
|
||||
@@ -91,6 +91,37 @@ class Processor
|
||||
foreach($users as $account => $user) $this->dao->update(TABLE_USER)->data($user)->where('account')->eq($account)->exec();
|
||||
|
||||
$this->dao->update(TABLE_USERCONTACT)->set('account')->eq('admin')->where('account')->like('admin%')->exec();
|
||||
|
||||
$productIDList = $this->dao->select('id')->from(TABLE_PRODUCT)->fetchAll();
|
||||
$projectIDList = $this->dao->select('id')->from(TABLE_PROJECT)->where('type')->eq('project')->fetchAll();
|
||||
$sprintIDList = $this->dao->select('id')->from(TABLE_EXECUTION)->where('type')->in('sprint,stage,kanban')->fetchAll();
|
||||
|
||||
$product = array();
|
||||
$project = array();
|
||||
$sprint = array();
|
||||
foreach($productIDList as $productID) $product[] = $productID->id;
|
||||
foreach($projectIDList as $projectID) $project[] = $projectID->id;
|
||||
foreach($sprintIDList as $sprintID) $sprint[] = $sprintID->id;
|
||||
|
||||
$products = ",".join(",",$product);
|
||||
$projects = ",".join(",",$project);
|
||||
$sprints = ",".join(",",$sprint);
|
||||
|
||||
$userViews = new stdclass();
|
||||
$userViews->account = 'admin';
|
||||
$userViews->programs = ',1,2,3,4,5,6,7,8,9,10';
|
||||
$userViews->products = $products;
|
||||
$userViews->projects = $projects;
|
||||
$userViews->sprints = $sprints;
|
||||
$this->dao->insert(TABLE_USERVIEW)->data($userViews)->exec();
|
||||
|
||||
$guestViews = new stdclass();
|
||||
$guestViews->account = 'guest';
|
||||
$guestViews->programs = '';
|
||||
$guestViews->products = '';
|
||||
$guestViews->projects = '';
|
||||
$guestViews->sprints = '';
|
||||
$this->dao->insert(TABLE_USERVIEW)->data($guestViews)->exec();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user