Mercurial > gemma
diff controllers/user.go @ 261:ab9859981ee3
If a user got renamed kick her/him from the connection pool.
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Fri, 27 Jul 2018 14:55:47 +0200 |
parents | dfc2b035e055 |
children | d89a19c297e0 |
line wrap: on
line diff
--- a/controllers/user.go Fri Jul 27 13:25:14 2018 +0200 +++ b/controllers/user.go Fri Jul 27 14:55:47 2018 +0200 @@ -251,6 +251,11 @@ return } + if user != newUser.User { + // Running in a go routine should not be necessary. + go func() { auth.ConnPool.Logout(user) }() + } + jr = JSONResult{ Code: http.StatusCreated, Result: struct {