summaryrefslogtreecommitdiff
path: root/lib/gitlab
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-02-23 18:42:02 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2021-02-23 18:42:02 +0000
commit5a1541a44f745cf9ae4121d6919a1530a7212afe (patch)
tree3841ea24d9eaa1e5521f168348af3fd409aab962 /lib/gitlab
parentf1bc6c9f752e5dcf11f5798c70498e9ae4a8e3ec (diff)
downloadgitlab-ce-5a1541a44f745cf9ae4121d6919a1530a7212afe.tar.gz
Add latest changes from gitlab-org/gitlab@13-9-stable-ee
Diffstat (limited to 'lib/gitlab')
-rw-r--r--lib/gitlab/current_settings.rb4
-rw-r--r--lib/gitlab/import_export/repo_restorer.rb2
-rw-r--r--lib/gitlab/template/base_template.rb2
-rw-r--r--lib/gitlab/template/issue_template.rb2
-rw-r--r--lib/gitlab/template/merge_request_template.rb2
5 files changed, 8 insertions, 4 deletions
diff --git a/lib/gitlab/current_settings.rb b/lib/gitlab/current_settings.rb
index 0bf41f9dc0d..55f381fcb64 100644
--- a/lib/gitlab/current_settings.rb
+++ b/lib/gitlab/current_settings.rb
@@ -3,6 +3,10 @@
module Gitlab
module CurrentSettings
class << self
+ def signup_disabled?
+ !signup_enabled?
+ end
+
def current_application_settings
Gitlab::SafeRequestStore.fetch(:current_application_settings) { ensure_application_settings! }
end
diff --git a/lib/gitlab/import_export/repo_restorer.rb b/lib/gitlab/import_export/repo_restorer.rb
index 8af7b68d78e..998da3e4afb 100644
--- a/lib/gitlab/import_export/repo_restorer.rb
+++ b/lib/gitlab/import_export/repo_restorer.rb
@@ -42,7 +42,7 @@ module Gitlab
def ensure_repository_does_not_exist!
if repository.exists?
shared.logger.info(
- message: %Q{Deleting existing "#{repository.path}" to re-import it.}
+ message: %Q{Deleting existing "#{repository.disk_path}" to re-import it.}
)
Repositories::DestroyService.new(repository).execute
diff --git a/lib/gitlab/template/base_template.rb b/lib/gitlab/template/base_template.rb
index 0f933a61598..3be77aff07e 100644
--- a/lib/gitlab/template/base_template.rb
+++ b/lib/gitlab/template/base_template.rb
@@ -108,7 +108,7 @@ module Gitlab
# Gitaly the actual template names within a given project's repository for all file templates
# other than `issue` and `merge request` description templates, which would instead
# overwrite the `template_names` method to return a redis cached version, by reading cached values
- # from `repository.issue_template_names_by_category` and `repository.merge_request_template_names_by_category`
+ # from `repository.issue_template_names_hash` and `repository.merge_request_template_names_hash`
# methods.
def repository_template_names(project)
template_names_by_category(self.all(project))
diff --git a/lib/gitlab/template/issue_template.rb b/lib/gitlab/template/issue_template.rb
index 3049f43b322..30fff9bdae9 100644
--- a/lib/gitlab/template/issue_template.rb
+++ b/lib/gitlab/template/issue_template.rb
@@ -23,7 +23,7 @@ module Gitlab
# own caching mechanism to avoid the back and forth call jumps between finder and model.
#
# follow-up issue: https://gitlab.com/gitlab-org/gitlab/-/issues/300279
- project.repository.issue_template_names_by_category
+ project.repository.issue_template_names_hash
end
end
end
diff --git a/lib/gitlab/template/merge_request_template.rb b/lib/gitlab/template/merge_request_template.rb
index 9442f3b13fb..7491c8f26c6 100644
--- a/lib/gitlab/template/merge_request_template.rb
+++ b/lib/gitlab/template/merge_request_template.rb
@@ -23,7 +23,7 @@ module Gitlab
# own caching mechanism to avoid the back and forth call jumps between finder and model.
#
# follow-up issue: https://gitlab.com/gitlab-org/gitlab/-/issues/300279
- project.repository.merge_request_template_names_by_category
+ project.repository.merge_request_template_names_hash
end
end
end