* Adjust code
This commit is contained in:
@@ -84,7 +84,10 @@ class mr extends control
|
||||
|
||||
$gitlabHosts = $this->loadModel('gitlab')->getPairs();
|
||||
$gitlabUsers = $this->gitlab->getGitLabListByAccount();
|
||||
foreach($gitlabHosts as $gitlabID=> $gitlabHost) if(!$this->app->user->admin and !isset($gitlabUsers[$gitlabID])) unset($gitlabHosts[$gitlabID]);
|
||||
foreach($gitlabHosts as $gitlabID=> $gitlabHost)
|
||||
{
|
||||
if(!$this->app->user->admin and !isset($gitlabUsers[$gitlabID])) unset($gitlabHosts[$gitlabID]);
|
||||
}
|
||||
|
||||
$this->app->loadLang('repo'); /* Import lang in repo module. */
|
||||
$this->app->loadLang('compile');
|
||||
|
||||
@@ -1137,7 +1137,10 @@ class repo extends control
|
||||
$projects = $this->loadModel('gitlab')->apiGetProjects($gitlabID, $filter ? 'false' : 'true');
|
||||
if($filter == 'IS_DEVELOPER')
|
||||
{
|
||||
foreach($projects as $key => $project) if($this->gitlab->checkUserAccess($gitlabID, 0, $project, array(), 'developer') == false) unset($projects[$key]);
|
||||
foreach($projects as $key => $project)
|
||||
{
|
||||
if($this->gitlab->checkUserAccess($gitlabID, 0, $project, array(), 'developer') == false) unset($projects[$key]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user