gitlab-org--gitlab-foss/lib/gitlab/auth/result.rb

18 lines
310 B
Ruby
Raw Normal View History

module Gitlab
module Auth
2016-09-19 12:23:18 +00:00
Result = Struct.new(:actor, :project, :type, :authentication_abilities) do
def ci?
type == :ci
end
def lfs_deploy_token?
type == :lfs_deploy_token
end
def success?
actor.present? || type == :ci
end
end
end
end