From 4d3c0dd919e3ebc824b54917b47118fb1a37c740 Mon Sep 17 00:00:00 2001 From: Giga Chubinidze Date: Mon, 25 Sep 2023 15:33:36 +0400 Subject: [PATCH] Removed delete/edit comment access on archived results [SCI-9289] --- app/permissions/result.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/permissions/result.rb b/app/permissions/result.rb index 921a786d5..71ef8ebed 100644 --- a/app/permissions/result.rb +++ b/app/permissions/result.rb @@ -30,7 +30,7 @@ Canaid::Permissions.register_for(ResultComment) do %i(manage_result_comment) .each do |perm| can perm do |_, comment| - !comment.result.my_module.archived_branch? + !comment.result.my_module.archived_branch? && comment.result.active? end end