Merge branch 'zentaopms_239_wangjianhua_70793' into 'zentaopms_239'

* Add action logs and check privileges for linking project and Repos.

See merge request easycorp/zentaopms!5735
This commit is contained in:
李玉春
2022-10-13 05:05:01 +00:00
8 changed files with 19 additions and 3 deletions
+1
View File
@@ -392,6 +392,7 @@ $lang->action->label->updatetolib = 'updated';
$lang->action->label->ganttmove = 'sorted';
$lang->action->label->submitreview = 'submitted';
$lang->action->label->switchtolean = 'switch from new mode to lean mode';
$lang->action->label->managerepo = 'Linked Code Repo';
/* Dynamic information is grouped by object. */
$lang->action->dynamicAction = new stdclass;
+1
View File
@@ -392,6 +392,7 @@ $lang->action->label->updatetolib = 'updated';
$lang->action->label->ganttmove = 'sorted';
$lang->action->label->submitreview = 'submitted';
$lang->action->label->switchtolean = 'switch from new mode to lean mode';
$lang->action->label->managerepo = 'Linked Code Repo';
/* Dynamic information is grouped by object. */
$lang->action->dynamicAction = new stdclass;
+1
View File
@@ -392,6 +392,7 @@ $lang->action->label->updatetolib = 'MàJ';
$lang->action->label->ganttmove = 'sorted';
$lang->action->label->submitreview = 'submitted';
$lang->action->label->switchtolean = 'switch from new mode to lean mode';
$lang->action->label->managerepo = 'Linked Code Repo';
/* Dynamic information is grouped by object. */
$lang->action->dynamicAction = new stdclass();
+1
View File
@@ -306,6 +306,7 @@ $lang->action->label->syncproject = 'start';
$lang->action->label->syncexecution = 'start';
$lang->action->label->startProgram = '(The start of the project sets the status of the program as Ongoing)';
$lang->action->label->submitreview = 'submitted';
$lang->action->label->managerepo = 'Linked Code Repo';
/* Dynamic information is grouped by object. */
$lang->action->dynamicAction = new stdclass;
+1
View File
@@ -392,6 +392,7 @@ $lang->action->label->updatetolib = '更新了';
$lang->action->label->ganttmove = '排序了';
$lang->action->label->submitreview = '提交了评审';
$lang->action->label->switchtolean = '从综合模式切换为迅捷模式';
$lang->action->label->managerepo = '关联了代码库';
/* 动态信息按照对象分组 */
$lang->action->dynamicAction = new stdclass();
+1
View File
@@ -324,6 +324,7 @@ $lang->action->label->importfromgitlab = '從Gitlab關聯創建了';
$lang->action->label->archived = '歸檔了';
$lang->action->label->restore = '還原了';
$lang->action->label->mergedbranch = '合併分支';
$lang->action->label->managerepo = '關聯了代碼庫';
/* 動態信息按照對象分組 */
$lang->action->dynamicAction = new stdclass();
+1 -1
View File
@@ -2297,7 +2297,7 @@ class project extends control
}
$this->view->title = $this->lang->project->manageRepo;
$this->view->allRepos = $this->dao->select('*')->from(TABLE_REPO)->where('deleted')->eq(0)->fetchPairs('id', 'name');
$this->view->allRepos = $this->loadModel('repo')->getRepoPairs('');
$this->view->linkedRepos = $this->project->linkedRepoPairs($projectID);
$this->view->unlinkedRepos = array();
+12 -2
View File
@@ -2900,6 +2900,9 @@ class projectModel extends model
$this->dao->insert(TABLE_RELATION)->data($newRelation)->exec();
}
$this->loadModel('action');
$this->action->create('project', $projectID, 'manageRepo');
}
/**
@@ -2920,8 +2923,15 @@ class projectModel extends model
$repos = $this->dao->select('*')->from(TABLE_REPO)
->where('deleted')->eq(0)
->andWhere('id')->in($repoIDList)
->fetchPairs('id', 'name');
->fetchAll();
return $repos;
$repoPairs = array();
foreach($repos as $repo)
{
$scm = $repo->SCM == 'Subversion' ? 'svn' : strtolower($repo->SCM);
$repoPairs[$repo->id] = "[{$scm}] " . $repo->name;
}
return $repoPairs;
}
}