From 7b67d564b0d857f8e77604f9811b684a7f5cfe85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Gr=C3=B6ger?= Date: Thu, 4 Jun 2020 13:56:00 +0200 Subject: [PATCH] =?UTF-8?q?groups=20wird=20bei=20getLifeTime=20mitgeschick?= =?UTF-8?q?t,=20damit=20kein=20ein=20und=20ausloggen=20beim=20wechsel=20de?= =?UTF-8?q?s=20bardienstes=20n=C3=B6tig=20ist?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- geruecht/routes.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/geruecht/routes.py b/geruecht/routes.py index 96dc57e..a79e402 100644 --- a/geruecht/routes.py +++ b/geruecht/routes.py @@ -107,7 +107,8 @@ def _getLifeTime(**kwargs): if 'accToken' in kwargs: accToken = kwargs['accToken'] debug.debug("accessToken is {{ {} }}".format(accToken)) - retVal = {"value": accToken.lifetime} + retVal = {"value": accToken.lifetime, + "group": accToken.user.toJSON()['group']} debug.info( "return get lifetime from accesstoken {{ {} }}".format(retVal)) return jsonify(retVal) @@ -132,7 +133,8 @@ def _saveLifeTime(**kwargs): accToken.lifetime = lifetime debug.info("update accesstoken timestamp") accToken.updateTimestamp() - retVal = {"value": accToken.lifetime} + retVal = {"value": accToken.lifetime, + "group": accToken.user.toJSON()['group']} debug.info( "return save lifetime for accessToken {{ {} }}".format(retVal)) return jsonify(retVal)