Skip to content

Fix submit

Jonathan Cooper requested to merge DCDEV-23-fix-submit into develop

When a service agreement is created the "_links" section of the json document (eg https://catalogue.ceh.ac.uk/service-agreement/xyz-123-myid?format=json) contains 'http' rather than 'https' schema. This change forces those links to have the correct schema, which is 'https' when not using the 'development' profile, otherwise it is 'http'.

The change is implemented in uk.ac.ceh.gateway.catalogue.serviceagreement.ServiceAgreementModelAssembler, and uses the activeProfiles of the environment to detect the context it is running in. The associated test has its environment mocked to force it to use test values for activeProfiles.

Closes DCDEV-23

Merge request reports

Loading