changeset 281:3c5420976910

A user should see her/him self if asking for users listing.
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Mon, 30 Jul 2018 17:16:01 +0200
parents 1bca073ff301
children dfb989088158 0b4c824517c4
files controllers/routes.go
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/controllers/routes.go	Mon Jul 30 17:11:35 2018 +0200
+++ b/controllers/routes.go	Mon Jul 30 17:16:01 2018 +0200
@@ -17,7 +17,7 @@
 		all      = auth.EnsureRole("sys_admin", "waterway_admin", "waterway_user")
 	)
 
-	api.Handle("/users", sysAdmin(&JSONHandler{
+	api.Handle("/users", all(&JSONHandler{
 		Handle: listUsers,
 	})).Methods(http.MethodGet)