mirror of
https://github.com/composer/composer
synced 2025-05-09 08:32:56 +00:00
fix gitlab not telling visibilty if user is not logged in
This commit is contained in:
parent
37addea447
commit
2a89d37651
2 changed files with 44 additions and 1 deletions
|
@ -308,7 +308,12 @@ class GitLabDriver extends VcsDriver
|
|||
// we need to fetch the default branch from the api
|
||||
$resource = $this->getApiUrl();
|
||||
$this->project = JsonFile::parseJson($this->getContents($resource, true), $resource);
|
||||
$this->isPrivate = $this->project['visibility'] !== 'public';
|
||||
if (isset($this->project['visibility'])) {
|
||||
$this->isPrivate = $this->project['visibility'] !== 'public';
|
||||
} else {
|
||||
// client is not authendicated, therefore repository has to be public
|
||||
$this->isPrivate = false;
|
||||
}
|
||||
}
|
||||
|
||||
protected function attemptCloneFallback()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue