From 8b573c94895dc0ac0e1d9d59cf3e8745e8b539ca Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Thu, 17 Dec 2020 11:59:07 +0000 Subject: Add latest changes from gitlab-org/gitlab@13-7-stable-ee --- app/graphql/types/terraform/state_type.rb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'app/graphql/types/terraform/state_type.rb') diff --git a/app/graphql/types/terraform/state_type.rb b/app/graphql/types/terraform/state_type.rb index 05b6d130f19..d97e673bf31 100644 --- a/app/graphql/types/terraform/state_type.rb +++ b/app/graphql/types/terraform/state_type.rb @@ -19,9 +19,7 @@ module Types field :locked_by_user, Types::UserType, null: true, - authorize: :read_user, - description: 'The user currently holding a lock on the Terraform state', - resolve: -> (state, _, _) { Gitlab::Graphql::Loaders::BatchModelLoader.new(User, state.locked_by_user_id).find } + description: 'The user currently holding a lock on the Terraform state' field :locked_at, Types::TimeType, null: true, @@ -39,6 +37,10 @@ module Types field :updated_at, Types::TimeType, null: false, description: 'Timestamp the Terraform state was updated' + + def locked_by_user + Gitlab::Graphql::Loaders::BatchModelLoader.new(User, object.locked_by_user_id).find + end end end end -- cgit v1.2.3