From d325406f1ccdcb31855b51f57b5f8147ad57efb4 Mon Sep 17 00:00:00 2001 From: Mustafa Baser Date: Sat, 24 Sep 2022 16:52:38 +0300 Subject: [PATCH] fix: jans-cli hide user operations for openbanking (ref: #1878) --- jans-cli/cli/config_cli.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/jans-cli/cli/config_cli.py b/jans-cli/cli/config_cli.py index e3c59650e2d..02175698973 100755 --- a/jans-cli/cli/config_cli.py +++ b/jans-cli/cli/config_cli.py @@ -49,6 +49,7 @@ tabular_dataset = {'scim.get-users': 'Resources'} excluded_operations = {'scim': ['search-user'], 'jca':[]} + my_op_mode = 'scim' if 'scim' in os.path.basename(sys.argv[0]) else 'jca' sys.path.append(os.path.join(cur_dir, my_op_mode)) swagger_client = importlib.import_module(my_op_mode + '.swagger_client') @@ -142,6 +143,9 @@ def join(self): args = parser.parse_args() +if args.config_api_mtls_client_cert and args.config_api_mtls_client_key: + excluded_operations['jca'] += ['get-user', 'post-user', 'put-user', 'get-user-by-inum', 'delete-user', 'patch-user-by-inum'] + if not args.no_suggestion: from prompt_toolkit import prompt, HTML from prompt_toolkit.completion import WordCompleter