2014-11-14 16:23:55 +00:00
|
|
|
module Gitlab
|
|
|
|
class GitAccessStatus
|
|
|
|
attr_accessor :status, :message
|
|
|
|
alias_method :allowed?, :status
|
|
|
|
|
|
|
|
def initialize(status, message = '')
|
|
|
|
@status = status
|
|
|
|
@message = message
|
|
|
|
end
|
|
|
|
|
2016-07-20 10:14:06 +00:00
|
|
|
def to_json(opts = nil)
|
|
|
|
{ status: @status, message: @message }.to_json(opts)
|
2014-11-14 16:23:55 +00:00
|
|
|
end
|
|
|
|
end
|
2015-02-03 04:36:54 +00:00
|
|
|
end
|