Skip to content

Commit

Permalink
default to autoload unless xlst and xsd specified
Browse files Browse the repository at this point in the history
  • Loading branch information
celuchmarek committed Aug 5, 2024
1 parent 4f15057 commit 8d6ff3a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/controllers/api/v1/documents_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def document_params
params.require(:document).require(:content)

params[:parameters] = {} unless params[:parameters]
params[:parameters][:autoLoadEform] = true unless params[:parameters][:containerXmlns]
params[:parameters][:autoLoadEform] = true unless params[:schema] && params[:transformation]

params.permit(
:encryption_key,
Expand Down Expand Up @@ -136,6 +136,10 @@ def document_params
)
end

def should_auto_load(params)
(!params[:parameters][:containerXmlns]) or params[:parameters][:embedUsedSchemas]
end

def datatosign_params
params.permit(:encryption_key, :id, :signing_certificate, :add_timestamp)
end
Expand Down

0 comments on commit 8d6ff3a

Please sign in to comment.