clean: remove unused Current.administrateur
This commit is contained in:
parent
9ead0daf32
commit
a984c21f64
4 changed files with 3 additions and 8 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -151,7 +151,6 @@ class ApplicationController < ActionController::Base
|
|||
private
|
||||
|
||||
def set_current_roles
|
||||
Current.administrateur = current_administrateur
|
||||
Current.instructeur = current_instructeur
|
||||
end
|
||||
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
class Current < ActiveSupport::CurrentAttributes
|
||||
attribute :instructeur, :administrateur, :request_id
|
||||
attribute :instructeur, :request_id
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue