Merge pull request #5065 from artoscinote/ma_SCI_8059

Fix display of unauthorized error on protocol page [SCI-8059]
This commit is contained in:
artoscinote 2023-03-02 15:46:10 +01:00 committed by GitHub
commit a43bd9d7f9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1146,7 +1146,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