2015-04-26 12:48:37 +05:30
|
|
|
module Gitlab
|
|
|
|
class GitAccessStatus
|
|
|
|
attr_accessor :status, :message
|
|
|
|
alias_method :allowed?, :status
|
|
|
|
|
|
|
|
def initialize(status, message = '')
|
|
|
|
@status = status
|
|
|
|
@message = message
|
|
|
|
end
|
|
|
|
|
2016-08-24 12:49:21 +05:30
|
|
|
def to_json(opts = nil)
|
|
|
|
{ status: @status, message: @message }.to_json(opts)
|
2015-04-26 12:48:37 +05:30
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|