* Finish task #48095.

This commit is contained in:
liyuchun
2022-01-21 09:52:27 +08:00
parent ff88318735
commit bb7e0b9fc6
3 changed files with 8 additions and 0 deletions
+6
View File
@@ -606,6 +606,12 @@ class gitlab extends control
*/
public function browseProject($gitlabID, $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 15, $pageID = 1)
{
if(!$this->app->user->admin)
{
$openID = $this->gitlab->getUserIDByZentaoAccount($gitlabID, $this->app->user->account);
if(!$openID) return print(js::alert($this->lang->gitlab->mustBindUser) . js::locate($this->createLink('gitlab', 'browse')));
}
$this->app->loadClass('pager', $static = true);
$pager = new pager($recTotal, $recPerPage, $pageID);
$keyword = fixer::input('post')->setDefault('keyword', '')->get('keyword'); // Fix bug#16741.
+1
View File
@@ -72,6 +72,7 @@ $lang->gitlab->tokenFirst = 'When the Token is not empty, the Token will be u
$lang->gitlab->tips = 'When using a password, please disable the "Prevent cross-site request forgery" option in the GitLab global security settings.';
$lang->gitlab->emptyError = " cannot be empty";
$lang->gitlab->createSuccess = "Create success";
$lang->gitlab->mustBindUser = 'You have not registered the GitLab account, please contact the administrator to register.';
$lang->gitlab->placeholder = new stdclass;
$lang->gitlab->placeholder->name = '';
+1
View File
@@ -72,6 +72,7 @@ $lang->gitlab->tokenFirst = 'Token不为空时,优先使用Token。';
$lang->gitlab->tips = '使用密码时,请在GitLab全局安全设置中禁用"防止跨站点请求伪造"选项。';
$lang->gitlab->emptyError = "不能为空";
$lang->gitlab->createSuccess = "创建成功";
$lang->gitlab->mustBindUser = '您还未绑定GitLab用户,请联系管理员进行绑定';
$lang->gitlab->placeholder = new stdclass;
$lang->gitlab->placeholder->name = '';