tech(rubocopify): ... just clean up ...

This commit is contained in:
Martin 2022-07-21 15:27:21 +02:00 committed by mfo
parent 5e8210b8f8
commit d1297bc1f5
5 changed files with 14 additions and 19 deletions

View file

@ -6,7 +6,6 @@ module Instructeurs
:instructeur
end
def ensure_not_super_admin!
if is_super_admin_through_assign_tos_as_manager?
redirect_back fallback_location: root_url, alert: "Interdit aux super admins", status: 403
@ -21,7 +20,5 @@ module Instructeurs
.count
.positive?
end
end
end

View file

@ -1,6 +1,7 @@
module Instructeurs
class ProceduresController < InstructeurController
before_action :ensure_ownership!, except: [:index]
before_action :ensure_not_super_admin!, only: [:download_export]
ITEMS_PER_PAGE = 25

View file

@ -26,9 +26,9 @@
# last_champ_updated_at :datetime
# last_commentaire_updated_at :datetime
# motivation :text
# private_search_terms :text
# private_search_terms :string
# processed_at :datetime
# search_terms :text
# search_terms :string
# state :string
# termine_close_to_expiration_notice_sent_at :datetime
# created_at :datetime

View file

@ -79,7 +79,6 @@ describe Administrateurs::ExportsController, type: :controller do
expect(response).to have_http_status(:forbidden)
end
end
end
end
end

View file

@ -24,7 +24,6 @@ describe Instructeurs::ArchivesController, type: :controller do
context 'signed in not as manager' do
let(:manager) { false }
it { is_expected.to have_http_status(:success) }
it 'assigns archives' do
subject
@ -65,7 +64,6 @@ describe Instructeurs::ArchivesController, type: :controller do
it { is_expected.to have_http_status(:forbidden) }
end
end
private