summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAsh McKenzie <amckenzie@gitlab.com>2019-03-28 12:33:45 +1100
committerAsh McKenzie <amckenzie@gitlab.com>2019-04-04 14:20:11 +1100
commit6b7a9b7498a4c91ca9c7324a0e31d8a142fddeef (patch)
tree0a81e50117474a2773d49b2f912b71c4a4496fb4 /lib
parent74ace2a445a44a13bd22c1907b8ec55b1772d403 (diff)
downloadgitlab-ce-6b7a9b7498a4c91ca9c7324a0e31d8a142fddeef.tar.gz
Currently a no-op for CE
Diffstat (limited to 'lib')
-rw-r--r--lib/api/internal.rb3
-rw-r--r--lib/gitlab/git_access.rb6
-rw-r--r--lib/gitlab/git_access_result/success.rb5
3 files changed, 12 insertions, 2 deletions
diff --git a/lib/api/internal.rb b/lib/api/internal.rb
index cb9aa849eeb..9c7b9146c8f 100644
--- a/lib/api/internal.rb
+++ b/lib/api/internal.rb
@@ -87,7 +87,8 @@ module API
gl_id: Gitlab::GlId.gl_id(user),
gl_username: user&.username,
git_config_options: [],
- gitaly: gitaly_payload(params[:action])
+ gitaly: gitaly_payload(params[:action]),
+ gl_console_messages: check_result.console_messages
}
# Custom option for git-receive-pack command
diff --git a/lib/gitlab/git_access.rb b/lib/gitlab/git_access.rb
index 010bd0e520c..cb80ed64eff 100644
--- a/lib/gitlab/git_access.rb
+++ b/lib/gitlab/git_access.rb
@@ -85,7 +85,7 @@ module Gitlab
check_push_access!
end
- ::Gitlab::GitAccessResult::Success.new
+ ::Gitlab::GitAccessResult::Success.new(console_messages: check_for_console_messages(cmd))
end
def guest_can_download_code?
@@ -116,6 +116,10 @@ module Gitlab
nil
end
+ def check_for_console_messages(cmd)
+ []
+ end
+
def check_valid_actor!
return unless actor.is_a?(Key)
diff --git a/lib/gitlab/git_access_result/success.rb b/lib/gitlab/git_access_result/success.rb
index 7bb9f24cb0e..e950d727e2e 100644
--- a/lib/gitlab/git_access_result/success.rb
+++ b/lib/gitlab/git_access_result/success.rb
@@ -3,6 +3,11 @@
module Gitlab
module GitAccessResult
class Success
+ attr_reader :console_messages
+
+ def initialize(console_messages: [])
+ @console_messages = console_messages
+ end
end
end
end