Fix display of unauthorized error on protocol page [SCI-8059]

This commit is contained in:
Martin Artnik 2023-03-02 15:05:50 +01:00
parent 9908b31d11
commit 72831cd015

View file

@ -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