This commit is contained in:
liyuchun
2022-03-29 16:20:43 +08:00
parent 78b5d154af
commit e0a2088ce8
2 changed files with 10 additions and 1 deletions
+9
View File
@@ -550,10 +550,19 @@ class gitlab extends control
*/
public function browseUser($gitlabID, $orderBy = 'id_desc')
{
$isAdmin = true;
if(!$this->app->user->admin)
{
$userID = $this->gitlab->getUserIDByZentaoAccount($gitlabID, $this->app->user->account);
$user = $this->gitlab->apiGetSingleUser($gitlabID, $userID);
if(!$user->is_admin) $isAdmin = false;
}
$this->view->title = $this->lang->gitlab->common . $this->lang->colon . $this->lang->gitlab->browseUser;
$this->view->gitlabID = $gitlabID;
$this->view->gitlabUserList = $this->gitlab->apiGetUsers($gitlabID, false, $orderBy);
$this->view->orderBy = $orderBy;
$this->view->isAdmin = $isAdmin;
$this->display();
}