changeset 4190:0601143ffd02

The system stetting should only be setable by a the system admin.
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Mon, 12 Aug 2019 11:35:27 +0200
parents 2ac52d89619e
children a1cc14c9ce69
files pkg/controllers/routes.go
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/pkg/controllers/routes.go	Wed Aug 07 15:23:41 2019 +0200
+++ b/pkg/controllers/routes.go	Mon Aug 12 11:35:27 2019 +0200
@@ -83,7 +83,7 @@
 		Handle: getSystemSettings,
 	})).Methods(http.MethodGet)
 
-	api.Handle("/system/settings", any(&JSONHandler{
+	api.Handle("/system/settings", sysAdmin(&JSONHandler{
 		Input:  func(*http.Request) interface{} { return &map[string]string{} },
 		Handle: setSystemSettings,
 	})).Methods(http.MethodPut)