summaryrefslogtreecommitdiff
path: root/lib/gitlab/auth/result.rb
blob: bf625649cbf440d52bf6c9f79d5795a423262b2d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
module Gitlab
  module Auth
    Result = Struct.new(:actor, :project, :type, :authentication_abilities) do
      def ci?
        type == :ci
      end

      def success?
        actor.present? || type == :ci
      end
    end
  end
end