groups wird bei getLifeTime mitgeschickt, damit kein ein und ausloggen beim wechsel des bardienstes nötig ist

This commit is contained in:
Tim Gröger 2020-06-04 13:56:00 +02:00
parent 5835cec4a4
commit 7b67d564b0
1 changed files with 4 additions and 2 deletions

View File

@ -107,7 +107,8 @@ def _getLifeTime(**kwargs):
if 'accToken' in kwargs: if 'accToken' in kwargs:
accToken = kwargs['accToken'] accToken = kwargs['accToken']
debug.debug("accessToken is {{ {} }}".format(accToken)) debug.debug("accessToken is {{ {} }}".format(accToken))
retVal = {"value": accToken.lifetime} retVal = {"value": accToken.lifetime,
"group": accToken.user.toJSON()['group']}
debug.info( debug.info(
"return get lifetime from accesstoken {{ {} }}".format(retVal)) "return get lifetime from accesstoken {{ {} }}".format(retVal))
return jsonify(retVal) return jsonify(retVal)
@ -132,7 +133,8 @@ def _saveLifeTime(**kwargs):
accToken.lifetime = lifetime accToken.lifetime = lifetime
debug.info("update accesstoken timestamp") debug.info("update accesstoken timestamp")
accToken.updateTimestamp() accToken.updateTimestamp()
retVal = {"value": accToken.lifetime} retVal = {"value": accToken.lifetime,
"group": accToken.user.toJSON()['group']}
debug.info( debug.info(
"return save lifetime for accessToken {{ {} }}".format(retVal)) "return save lifetime for accessToken {{ {} }}".format(retVal))
return jsonify(retVal) return jsonify(retVal)