Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • dev
  • github/fork/vyskocilpavel/auth_active_probe_config
  • main
  • probes_script
  • renovate/commitlint
  • renovate/docker-7.x
  • renovate/lock-file-maintenance
  • xpavlic/run_probes_jpmu_test
  • v1.0.0
  • v1.1.0
  • v1.10.0
  • v1.11.0
  • v1.2.0
  • v1.3.0
  • v1.4.0
  • v1.5.0
  • v1.6.0
  • v1.7.0
  • v1.7.1
  • v1.8.0
  • v1.8.1
  • v1.8.2
  • v1.8.3
  • v1.8.4
  • v1.8.5
  • v1.9.0
  • v1.9.1
  • v1.9.2
  • v2.0.0
  • v2.1.0
  • v2.2.0
  • v2.2.1
  • v2.2.2
  • v2.3.0
  • v2.4.0
  • v2.5.0
  • v2.5.1
  • v2.5.2
  • v2.5.3
  • v2.5.4
  • v2.6.0
  • v2.7.0
  • v2.7.1
  • v2.7.2
  • v2.7.3
  • v2.7.4
  • v3.0.0
  • v3.1.0
48 results

Target

Select target project
  • perun/perun-proxyidp/perun-proxy-utils
1 result
Select Git revision
  • dev
  • github/fork/vyskocilpavel/auth_active_probe_config
  • main
  • probes_script
  • renovate/commitlint
  • renovate/docker-7.x
  • renovate/lock-file-maintenance
  • xpavlic/run_probes_jpmu_test
  • v1.0.0
  • v1.1.0
  • v1.10.0
  • v1.11.0
  • v1.2.0
  • v1.3.0
  • v1.4.0
  • v1.5.0
  • v1.6.0
  • v1.7.0
  • v1.7.1
  • v1.8.0
  • v1.8.1
  • v1.8.2
  • v1.8.3
  • v1.8.4
  • v1.8.5
  • v1.9.0
  • v1.9.1
  • v1.9.2
  • v2.0.0
  • v2.1.0
  • v2.2.0
  • v2.2.1
  • v2.2.2
  • v2.3.0
  • v2.4.0
  • v2.5.0
  • v2.5.1
  • v2.5.2
  • v2.5.3
  • v2.5.4
  • v2.6.0
  • v2.7.0
  • v2.7.1
  • v2.7.2
  • v2.7.3
  • v2.7.4
  • v3.0.0
  • v3.1.0
48 results
Show changes
Commits on Source (3)
## [2.5.4](https://gitlab.ics.muni.cz/perun/perun-proxyidp/perun-proxy-utils/compare/v2.5.3...v2.5.4) (2024-02-12)
### Bug Fixes
* user token types calculation logic ([669e2bb](https://gitlab.ics.muni.cz/perun/perun-proxyidp/perun-proxy-utils/commit/669e2bb5908e7c3c6dccf984818ea01e84defd73))
## [2.5.3](https://gitlab.ics.muni.cz/perun/perun-proxyidp/perun-proxy-utils/compare/v2.5.2...v2.5.3) (2024-02-07)
......
import argparse
import os
import re
from collections import defaultdict
from typing import List, Tuple, Optional, Pattern
import yaml
......@@ -128,18 +129,16 @@ def main():
mfa_active_tokens_attr_name = args.mfa_active_tokens_attr_name
adapters_manager = get_adapters_manager(args.perun_connector_config_path)
user_token_types = get_user_token_types()
current_user_id = ""
current_user_token_types = []
user_all_usable_tokens = defaultdict(list)
for privacyidea_user_id, token_type in user_token_types:
perun_user_id = parse_perun_user_id(perun_user_id_regex, privacyidea_user_id)
if perun_user_id and perun_user_id != current_user_id:
if current_user_id:
current_user_token_types.sort()
attr_to_set = {mfa_active_tokens_attr_name: current_user_token_types}
adapters_manager.set_user_attributes(int(perun_user_id), attr_to_set)
current_user_id = perun_user_id
current_user_token_types = []
current_user_token_types.append(token_type)
user_all_usable_tokens[perun_user_id].append(token_type)
for perun_user_id, token_types in user_all_usable_tokens.items():
token_types.sort()
attr_to_set = {mfa_active_tokens_attr_name: token_types}
adapters_manager.set_user_attributes(int(perun_user_id), attr_to_set)
if __name__ == "__main__":
......
[metadata]
version = 2.5.3
version = 2.5.4
license_files = LICENSE
long_description = file: README.md
long_description_content_type = text/markdown
......