# HG changeset patch # User Sascha L. Teichmann # Date 1552995763 -3600 # Node ID a10022399e2419b512c02afc181db8016f652f63 # Parent 1c0307207162d65423de89147d7dfd97d6cfa962 WFS downloads: Fetch user and password from config. diff -r 1c0307207162 -r a10022399e24 pkg/controllers/uploadedimports.go --- a/pkg/controllers/uploadedimports.go Tue Mar 19 12:28:42 2019 +0100 +++ b/pkg/controllers/uploadedimports.go Tue Mar 19 12:42:43 2019 +0100 @@ -58,12 +58,17 @@ precision = &v } + user := req.FormValue("user") + password := req.FormValue("password") + return &imports.WaterwayProfiles{ Dir: dir, URL: url, FeatureType: featureType, SortBy: sortBy, Precision: precision, + User: user, + Password: password, }, nil }, ) diff -r 1c0307207162 -r a10022399e24 pkg/imports/dma.go --- a/pkg/imports/dma.go Tue Mar 19 12:28:42 2019 +0100 +++ b/pkg/imports/dma.go Tue Mar 19 12:42:43 2019 +0100 @@ -35,6 +35,10 @@ FeatureType string `json:"feature-type"` // SortBy sorts the feature by this key. SortBy string `json:"sort-by"` + // User is an optional username for Basic Auth. + User string `json:"user,omitempty"` + // Password is an optional password for Basic Auth. + Password string `json:"password,omitempty"` } // DMAJobKind is the import queue type identifier. diff -r 1c0307207162 -r a10022399e24 pkg/imports/fd.go --- a/pkg/imports/fd.go Tue Mar 19 12:28:42 2019 +0100 +++ b/pkg/imports/fd.go Tue Mar 19 12:42:43 2019 +0100 @@ -39,6 +39,10 @@ MaxWidth int `json:"max-width"` Depth int `json:"depth"` SourceOrganization string `json:"source-organization"` + // User is an optional username for Basic Auth. + User string `json:"user,omitempty"` + // Password is an optional password for Basic Auth. + Password string `json:"password,omitempty"` } type fdTime struct{ time.Time } diff -r 1c0307207162 -r a10022399e24 pkg/imports/modelconvert.go --- a/pkg/imports/modelconvert.go Tue Mar 19 12:28:42 2019 +0100 +++ b/pkg/imports/modelconvert.go Tue Mar 19 12:42:43 2019 +0100 @@ -67,6 +67,8 @@ URL: wxi.URL, FeatureType: wxi.FeatureType, SortBy: nilString(wxi.SortBy), + User: nilString(wxi.User), + Password: nilString(wxi.Password), } }, @@ -76,6 +78,8 @@ URL: wai.URL, FeatureType: wai.FeatureType, SortBy: nilString(wai.SortBy), + User: nilString(wai.User), + Password: nilString(wai.Password), } }, @@ -110,6 +114,8 @@ MaxWidth: fdi.MaxWidth, Depth: fdi.Depth, SourceOrganization: fdi.SourceOrganization, + User: nilString(fdi.User), + Password: nilString(fdi.Password), } }, @@ -119,6 +125,8 @@ URL: dmai.URL, FeatureType: dmai.FeatureType, SortBy: nilString(dmai.SortBy), + User: nilString(dmai.User), + Password: nilString(dmai.Password), } }, diff -r 1c0307207162 -r a10022399e24 pkg/imports/wa.go --- a/pkg/imports/wa.go Tue Mar 19 12:28:42 2019 +0100 +++ b/pkg/imports/wa.go Tue Mar 19 12:42:43 2019 +0100 @@ -38,6 +38,10 @@ // SortBy works around misconfigured services to // establish a sort order to get the features. SortBy string `json:"sort-by"` + // User is an optional username for Basic Auth. + User string `json:"user,omitempty"` + // Password is an optional password for Basic Auth. + Password string `json:"password,omitempty"` } // WAJobKind is the import queue type identifier. diff -r 1c0307207162 -r a10022399e24 pkg/imports/wp.go --- a/pkg/imports/wp.go Tue Mar 19 12:28:42 2019 +0100 +++ b/pkg/imports/wp.go Tue Mar 19 12:42:43 2019 +0100 @@ -50,6 +50,10 @@ SortBy string `json:"sort-by"` // Precsion of match points to line strings. Precision *float64 `json:"precision,omitempty"` + // User is an optional username for Basic Auth. + User string `json:"user,omitempty"` + // Password is an optional password for Basic Auth. + Password string `json:"password,omitempty"` } const WPJobKind JobKind = "wp" diff -r 1c0307207162 -r a10022399e24 pkg/imports/wx.go --- a/pkg/imports/wx.go Tue Mar 19 12:28:42 2019 +0100 +++ b/pkg/imports/wx.go Tue Mar 19 12:42:43 2019 +0100 @@ -37,6 +37,10 @@ // SortBy works around misconfigured services to // establish a sort order to get the features. SortBy string `json:"sort-by"` + // User is an optional username for Basic Auth. + User string `json:"user,omitempty"` + // Password is an optional password for Basic Auth. + Password string `json:"password,omitempty"` } // WXJobKind is the import queue type identifier.