From 72831cd015cf2f8f3e2ce79b08f2f574bf2bad80 Mon Sep 17 00:00:00 2001 From: Martin Artnik Date: Thu, 2 Mar 2023 15:05:50 +0100 Subject: [PATCH] Fix display of unauthorized error on protocol page [SCI-8059] --- app/controllers/protocols_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/protocols_controller.rb b/app/controllers/protocols_controller.rb index 181e76a37..0deb95d4e 100644 --- a/app/controllers/protocols_controller.rb +++ b/app/controllers/protocols_controller.rb @@ -1145,7 +1145,7 @@ class ProtocolsController < ApplicationController unless @protocol.present? && (can_read_protocol_in_module?(@protocol) || can_read_protocol_in_repository?(@protocol)) - respond_to { |f| f.json { render json: {}, status: :unauthorized } } + render_403 end end