Skip to content

Commit 52ae27d

Browse files
authored
Merge pull request #370 from DigitalSlideArchive/support-short-login-sessions
Add a guard to checking the token.
2 parents 5cc06c4 + f6ab21e commit 52ae27d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

histomicsui/handlers.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,7 @@ def getCurrentUser(*args, **kwargs):
329329
user = result[0] if isinstance(result, tuple) else result
330330
if user:
331331
token = girder.api.rest.getCurrentToken()
332+
if user and token:
332333
if token['_id'] not in _recentTokens or time.time() - _recentTokens[token['_id']] > 60:
333334
if Setting().get(PluginSettings.HUI_LOGIN_SESSION_EXPIRY_MINUTES):
334335
days = float(Setting().get(

0 commit comments

Comments
 (0)