clean: remove unused Current.administrateur

This commit is contained in:
simon lehericey 2023-03-15 17:22:12 +01:00
parent 9ead0daf32
commit a984c21f64
4 changed files with 3 additions and 8 deletions

View file

@ -46,9 +46,7 @@ class API::V1::DossiersController < APIController
@procedure = Procedure.for_api.find(params[:procedure_id])
administrateur = find_administrateur_for_token(@procedure)
if administrateur
Current.administrateur = administrateur
else
if administrateur.nil?
render json: {}, status: :unauthorized
end

View file

@ -11,9 +11,7 @@ class API::V1::ProceduresController < APIController
@procedure = Procedure.for_api.find(params[:id])
administrateur = find_administrateur_for_token(@procedure)
if administrateur
Current.administrateur = administrateur
else
if administrateur.nil?
render json: {}, status: :unauthorized
end

View file

@ -151,7 +151,6 @@ class ApplicationController < ActionController::Base
private
def set_current_roles
Current.administrateur = current_administrateur
Current.instructeur = current_instructeur
end

View file

@ -1,3 +1,3 @@
class Current < ActiveSupport::CurrentAttributes
attribute :instructeur, :administrateur, :request_id
attribute :instructeur, :request_id
end