Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/graphql/mutations/base_mutation.rb')
-rw-r--r--app/graphql/mutations/base_mutation.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/graphql/mutations/base_mutation.rb b/app/graphql/mutations/base_mutation.rb
index 68e7853a9b1..577f10545b3 100644
--- a/app/graphql/mutations/base_mutation.rb
+++ b/app/graphql/mutations/base_mutation.rb
@@ -17,6 +17,10 @@ module Mutations
context[:current_user]
end
+ def api_user?
+ context[:is_sessionless_user]
+ end
+
# Returns Array of errors on an ActiveRecord object
def errors_on_object(record)
record.errors.full_messages