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