summaryrefslogtreecommitdiff
path: root/lib/gitlab_access_status.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab_access_status.rb')
-rw-r--r--lib/gitlab_access_status.rb32
1 files changed, 0 insertions, 32 deletions
diff --git a/lib/gitlab_access_status.rb b/lib/gitlab_access_status.rb
deleted file mode 100644
index c639462..0000000
--- a/lib/gitlab_access_status.rb
+++ /dev/null
@@ -1,32 +0,0 @@
-require 'json'
-
-class GitAccessStatus
- attr_reader :message, :gl_repository, :gl_id, :gl_username, :repository_path, :gitaly, :git_protocol
-
- def initialize(status, message, gl_repository:, gl_id:, gl_username:, repository_path:, gitaly:, git_protocol:)
- @status = status
- @message = message
- @gl_repository = gl_repository
- @gl_id = gl_id
- @gl_username = gl_username
- @repository_path = repository_path
- @gitaly = gitaly
- @git_protocol = git_protocol
- end
-
- def self.create_from_json(json)
- values = JSON.parse(json)
- new(values["status"],
- values["message"],
- gl_repository: values["gl_repository"],
- gl_id: values["gl_id"],
- gl_username: values["gl_username"],
- repository_path: values["repository_path"],
- gitaly: values["gitaly"],
- git_protocol: values["git_protocol"])
- end
-
- def allowed?
- @status
- end
-end