attestation_template v2 : add feature flag
This commit is contained in:
parent
791954af1b
commit
9fc6c3b641
1 changed files with 5 additions and 1 deletions
|
@ -1,6 +1,6 @@
|
||||||
module Administrateurs
|
module Administrateurs
|
||||||
class AttestationTemplateV2sController < AdministrateurController
|
class AttestationTemplateV2sController < AdministrateurController
|
||||||
before_action :retrieve_procedure, :retrieve_attestation_template
|
before_action :retrieve_procedure, :retrieve_attestation_template, :ensure_feature_active
|
||||||
|
|
||||||
def show
|
def show
|
||||||
json_body = @attestation_template.json_body&.deep_symbolize_keys
|
json_body = @attestation_template.json_body&.deep_symbolize_keys
|
||||||
|
@ -33,6 +33,10 @@ module Administrateurs
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
|
def ensure_feature_active
|
||||||
|
redirect_to root_path if !@procedure.feature_enabled?(:attestation_v2)
|
||||||
|
end
|
||||||
|
|
||||||
def retrieve_attestation_template
|
def retrieve_attestation_template
|
||||||
@attestation_template = @procedure.attestation_template || @procedure.build_attestation_template
|
@attestation_template = @procedure.attestation_template || @procedure.build_attestation_template
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue