Mercurial > gemma
changeset 5497:1e6053a4ed98 deactivate-users
Only active users can get a session token.
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Tue, 21 Sep 2021 15:39:51 +0200 |
parents | 8797274e2739 |
children | 59cbd1b48c3a |
files | pkg/auth/opendb.go |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/pkg/auth/opendb.go Tue Sep 21 15:31:26 2021 +0200 +++ b/pkg/auth/opendb.go Tue Sep 21 15:39:51 2021 +0200 @@ -104,7 +104,7 @@ ) SELECT rolname FROM pg_roles WHERE oid IN (SELECT oid FROM cte) AND rolname <> current_user -AND EXISTS (SELECT 1 FROM users.list_users WHERE username = current_user)` +AND EXISTS (SELECT 1 FROM users.list_users WHERE username = current_user AND active)` // AllOtherRoles loggs in as user with password and returns a list // of all roles the logged in user has in the system.