support username/password credential
This commit is contained in:
@@ -49,6 +49,7 @@ $lang->jenkins->username = '用户名';
|
||||
$lang->jenkins->password = '密码';
|
||||
$lang->jenkins->token = 'Token';
|
||||
$lang->jenkins->desc = '描述';
|
||||
$lang->jenkins->tips = '选择用户名密码类型凭证时,请在Jenkins全局安全设置中禁用"防止跨站点请求伪造"选项。';
|
||||
|
||||
$lang->jenkins->typeList['token'] = 'Token';
|
||||
$lang->jenkins->typeList['credential'] = '凭证';
|
||||
|
||||
+4
-4
@@ -708,7 +708,7 @@ class ciModel extends model
|
||||
{
|
||||
$credentials = $this->dao->select('id, name')->from(TABLE_CREDENTIALS)
|
||||
->where('deleted')->eq('0')
|
||||
->beginIF(!empty(whr))->andWhere($whr)->fi()
|
||||
->beginIF(!empty(whr))->andWhere('(' . $whr . ')')->fi()
|
||||
->orderBy(id)
|
||||
->fetchPairs();
|
||||
$credentials[''] = '';
|
||||
@@ -724,7 +724,7 @@ class ciModel extends model
|
||||
{
|
||||
$repos = $this->dao->select('id, name')->from(TABLE_REPO)
|
||||
->where('deleted')->eq('0')
|
||||
->beginIF(!empty(whr))->andWhere($whr)->fi()
|
||||
->beginIF(!empty(whr))->andWhere('(' . $whr . ')')->fi()
|
||||
->orderBy(id)
|
||||
->fetchPairs();
|
||||
$repos[''] = '';
|
||||
@@ -740,7 +740,7 @@ class ciModel extends model
|
||||
{
|
||||
$repos = $this->dao->select('*')->from(TABLE_REPO)
|
||||
->where('deleted')->eq('0')
|
||||
->beginIF(!empty(whr))->andWhere($whr)->fi()
|
||||
->beginIF(!empty(whr))->andWhere('(' . $whr . ')')->fi()
|
||||
->orderBy(id)
|
||||
->fetchAll();
|
||||
$repos[''] = '';
|
||||
@@ -756,7 +756,7 @@ class ciModel extends model
|
||||
{
|
||||
$repos = $this->dao->select('id, name')->from(TABLE_JENKINS)
|
||||
->where('deleted')->eq('0')
|
||||
->beginIF(!empty(whr))->andWhere($whr)->fi()
|
||||
->beginIF(!empty(whr))->andWhere('(' . $whr . ')')->fi()
|
||||
->orderBy(id)
|
||||
->fetchPairs();
|
||||
$repos[''] = '';
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
<tr id="credential-field">
|
||||
<th class='thWidth'><?php echo $lang->credential->common; ?></th>
|
||||
<td style="width:550px"><?php echo html::select('credential', $credentialList, '', "class='form-control chosen'"); ?></td>
|
||||
<td></td>
|
||||
<td><?php echo $lang->jenkins->tips; ?></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
<tr id="credential-field">
|
||||
<th class='thWidth'><?php echo $lang->credential->common; ?></th>
|
||||
<td style="width:550px"><?php echo html::select('credential', $credentialList, $jenkins->credential, "class='form-control'"); ?></td>
|
||||
<td></td>
|
||||
<td><?php echo $lang->jenkins->tips; ?></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
Reference in New Issue
Block a user