diff --git a/changelog/unreleased/def-invite-link.md b/changelog/unreleased/def-invite-link.md index 3169e6b041..24363a91cd 100644 --- a/changelog/unreleased/def-invite-link.md +++ b/changelog/unreleased/def-invite-link.md @@ -1,7 +1,8 @@ Enhancement: Remove redundant config for invite_link_template This is to drop invite_link_template from the OCM-related config. -The link template is still defined in a constant but not exposed - in the config, as it depends on Mentix and should not be changed. +Now the provider_domain and mesh_directory_url config options +are both mandatory in the sciencemesh http service, and the link +is directly built out of the context. https://github.com/cs3org/reva/pull/3905 diff --git a/examples/storage-references/gateway.toml b/examples/storage-references/gateway.toml index 8b887d1d3d..3070078503 100644 --- a/examples/storage-references/gateway.toml +++ b/examples/storage-references/gateway.toml @@ -48,3 +48,16 @@ mime_types = [ [http.services.ocdav] [http.services.ocs] [http.services.appprovider] + +[http.services.sciencemesh] +mesh_directory_url = 'https://sciencemesh.cesnet.cz/iop/meshdir' +provider_domain = 'your-domain.org' +body_template_path = '/etc/revad/sciencemesh_email_body' +ocm_mount_point = '/sciencemesh' + +[http.services.sciencemesh.smtp_credentials] +disable_auth = true +sender_mail = "sciencemesh@your-domain.org" +smtp_server = "your-smtp-server.your-domain.org" +smtp_port = 25 + diff --git a/internal/http/services/sciencemesh/sciencemesh.go b/internal/http/services/sciencemesh/sciencemesh.go index 4450ff0c91..6c0265e324 100644 --- a/internal/http/services/sciencemesh/sciencemesh.go +++ b/internal/http/services/sciencemesh/sciencemesh.go @@ -44,7 +44,10 @@ func New(m map[string]interface{}, log *zerolog.Logger) (global.Service, error) conf.init() if conf.ProviderDomain == "" { - return nil, errors.New("provider_domain missing from configuration") + return nil, errors.New("sciencemesh: provider_domain is missing from configuration") + } + if conf.MeshDirectoryURL == "" { + return nil, errors.New("sciencemesh: mesh_directory_url is missing from configuration") } r := chi.NewRouter()