2014-11-14 11:23:55 -05: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 06:14:06 -04:00
|
|
|
def to_json(opts = nil)
|
|
|
|
{ status: @status, message: @message }.to_json(opts)
|
2014-11-14 11:23:55 -05:00
|
|
|
end
|
|
|
|
end
|
2015-02-02 23:36:54 -05:00
|
|
|
end
|