diff options
Diffstat (limited to 'lib/gitlab/auth/result.rb')
-rw-r--r-- | lib/gitlab/auth/result.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/gitlab/auth/result.rb b/lib/gitlab/auth/result.rb new file mode 100644 index 00000000000..e4786b12676 --- /dev/null +++ b/lib/gitlab/auth/result.rb @@ -0,0 +1,17 @@ +module Gitlab + module Auth + 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 |