Skip to content

Commit 6f3bc2f

Browse files
author
Jelle Dijkstra
committed
Immutable baseURL
1 parent 0d74d31 commit 6f3bc2f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

api/v3/wfs_validation.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@ func (wfs *WFS) ValidateUpdate(wfsOld *WFS) ([]string, error) {
3434
reasons = append(reasons, fmt.Sprintf("%v", err))
3535
}
3636

37+
// Check service.baseURL did not change
38+
if wfs.Spec.Service.BaseURL != wfsOld.Spec.Service.BaseURL {
39+
reasons = append(reasons, fmt.Sprintf("service.baseURL is immutable"))
40+
}
41+
3742
if (wfs.Spec.Service.Inspire == nil && wfsOld.Spec.Service.Inspire != nil) || (wfs.Spec.Service.Inspire != nil && wfsOld.Spec.Service.Inspire == nil) {
3843
reasons = append(reasons, fmt.Sprintf("services cannot change from inspire to not inspire or the other way around"))
3944
}

0 commit comments

Comments
 (0)