Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorImre Farkas <ifarkas@gitlab.com>2018-06-05 23:20:37 +0300
committerImre Farkas <ifarkas@gitlab.com>2018-06-06 13:00:15 +0300
commitc5e44dc5d1a98a92362b93c30342ebf1f972061c (patch)
tree7a3856c10e94f5f9a92acec3ee13184b9141a2ba /lib/gitlab/legacy_github_import
parentd8eea0c4ba74a3bc821e1298e85f3fed77273099 (diff)
Use Github repo visibility during import while respecting restricted visibility levels
Diffstat (limited to 'lib/gitlab/legacy_github_import')
-rw-r--r--lib/gitlab/legacy_github_import/project_creator.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/gitlab/legacy_github_import/project_creator.rb b/lib/gitlab/legacy_github_import/project_creator.rb
index 3ce245a8050..5e96eb16754 100644
--- a/lib/gitlab/legacy_github_import/project_creator.rb
+++ b/lib/gitlab/legacy_github_import/project_creator.rb
@@ -35,7 +35,10 @@ module Gitlab
end
def visibility_level
- repo.private ? Gitlab::VisibilityLevel::PRIVATE : Gitlab::CurrentSettings.default_project_visibility
+ visibility_level = repo.private ? Gitlab::VisibilityLevel::PRIVATE : Gitlab::VisibilityLevel::PUBLIC
+ visibility_level = Gitlab::CurrentSettings.default_project_visibility if Gitlab::CurrentSettings.restricted_visibility_levels.include?(visibility_level)
+
+ visibility_level
end
#