diff options
author | Stan Hu <stanhu@gmail.com> | 2017-07-21 12:35:26 -0700 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2017-07-21 13:08:52 -0700 |
commit | f5591f68c1439eda836460e0dec44f610709a5b8 (patch) | |
tree | 6d85f1686ddf6317001d116ad53e37e616e6697c /lib/gitlab_access_status.rb | |
parent | 914f968523779972e74f5a12a9e6b668c184c898 (diff) | |
download | gitlab-shell-f5591f68c1439eda836460e0dec44f610709a5b8.tar.gz |
Support unhiding of all refs for Geo Nodes
By default, we hide certain refs (e.g. keep-around/XXX) to save user
download time. We need to preserve these references on secondary Geo
nodes to have a true copy.
Diffstat (limited to 'lib/gitlab_access_status.rb')
-rw-r--r-- | lib/gitlab_access_status.rb | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/gitlab_access_status.rb b/lib/gitlab_access_status.rb index a6a274c..494349d 100644 --- a/lib/gitlab_access_status.rb +++ b/lib/gitlab_access_status.rb @@ -1,19 +1,25 @@ require 'json' class GitAccessStatus - attr_reader :message, :gl_repository, :repository_path, :gitaly + attr_reader :message, :gl_repository, :repository_path, :gitaly, :geo_node - def initialize(status, message, gl_repository, repository_path, gitaly) + def initialize(status, message, gl_repository, repository_path, gitaly, geo_node) @status = status @message = message @gl_repository = gl_repository @repository_path = repository_path @gitaly = gitaly + @geo_node = geo_node end def self.create_from_json(json) values = JSON.parse(json) - self.new(values["status"], values["message"], values["gl_repository"], values["repository_path"], values["gitaly"]) + self.new(values["status"], + values["message"], + values["gl_repository"], + values["repository_path"], + values["gitaly"], + values["geo_node"]) end def allowed? |