Development
This commit is contained in:
parent
8aa4373a6b
commit
923600eef9
2 changed files with 14 additions and 11 deletions
|
|
@ -127,6 +127,10 @@ def collect_tokens(cfg):
|
|||
r['user_type_label'] = USER_TYPE_LABELS.get(r.get('user_type'), str(r.get('user_type', '')))
|
||||
r['expires_label'] = _format_session(r.get('session_seconds', 0))
|
||||
r['expiration_label'] = _format_expiration(r.get('date_set', 0), r.get('expires_seconds', 0))
|
||||
expires_seconds = r.get('expires_seconds', 0)
|
||||
is_expired = (expires_seconds > 0 and
|
||||
(r.get('date_set', 0) + expires_seconds) <= int(time.time()))
|
||||
r['active'] = r.get('enabled', 0) == 1 and not is_expired
|
||||
display_rows.append(r)
|
||||
|
||||
content = factory.load_json(f'{factory.PAGES_DIR}/clientcredentials/content.json')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue