From fd729e97fd018cadd11951e97043eb0a3bc5d8ef Mon Sep 17 00:00:00 2001 From: Rob Orton Date: Fri, 6 Aug 2021 13:23:25 -0600 Subject: [PATCH] don't check depth on can reply depth is no longer used in isolated view the column will likely be removed later, but it should not hinder our ability to reply test plan - have an entry with depth 3 or greater - it should allow you to reply fixes VICE-1815 flag=none Change-Id: Icb36057ae20c26b6e8794271a544f0bcdac9c4fb Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/270889 Tested-by: Service Cloud Jenkins Reviewed-by: Matthew Lemon QA-Review: Matthew Lemon Product-Review: Rob Orton --- app/graphql/types/discussion_entry_permissions_type.rb | 2 +- spec/graphql/types/discussion_entry_type_spec.rb | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/graphql/types/discussion_entry_permissions_type.rb b/app/graphql/types/discussion_entry_permissions_type.rb index 6d173bf7296..c11198b64da 100644 --- a/app/graphql/types/discussion_entry_permissions_type.rb +++ b/app/graphql/types/discussion_entry_permissions_type.rb @@ -30,7 +30,7 @@ module Types field :reply, Boolean, null: true def reply object[:loader].load(:reply).then do |can_reply| - can_reply && !object[:discussion_entry].deleted? && object[:discussion_entry].depth < 3 + can_reply && !object[:discussion_entry].deleted? end end diff --git a/spec/graphql/types/discussion_entry_type_spec.rb b/spec/graphql/types/discussion_entry_type_spec.rb index 2a59e670c55..0c0ab98101f 100644 --- a/spec/graphql/types/discussion_entry_type_spec.rb +++ b/spec/graphql/types/discussion_entry_type_spec.rb @@ -125,6 +125,7 @@ describe Types::DiscussionEntryType do it 'returns the current user permissions' do student_in_course(active_all: true) + discussion_entry.update(depth: 4) type = GraphQLTypeTester.new(discussion_entry, current_user: @student) permissions.each do |permission|