Skip to content

Commit

Permalink
fix: jans-cli tabulate attrbiutes (#2321)
Browse files Browse the repository at this point in the history
  • Loading branch information
devrimyatar committed Sep 7, 2022
1 parent 8e48d71 commit cb1e40d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion jans-cli/cli/config_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
tabulate_endpoints = {
'jca.get-config-scripts': ['scriptType', 'name', 'enabled', 'inum'],
'jca.get-user': ['inum', 'userId', 'mail','sn', 'givenName', 'jansStatus'],
'jca.get-attributes': ['inum', 'name', 'displayName', 'status', 'dataType', 'claimName'],
'jca.get-all-attribute': ['inum', 'name', 'displayName', 'status', 'dataType', 'claimName'],
'jca.get-oauth-openid-clients': ['inum', 'displayName', 'clientName', 'applicationType'],
'jca.get-oauth-scopes': ['dn', 'id', 'scopeType'],
'scim.get-users': ['id', 'userName', 'displayName', 'active']
Expand Down Expand Up @@ -1187,6 +1187,10 @@ def process_get(self, endpoint, return_value=False, parameters=None):
elif attrib['name'] in tabulate_endpoints[op_mode_endpoint]:
entry[attrib['name']] = attrib['values'][0]

elif endpoint.info['operationId'] == 'get-all-attribute':
if 'data' in api_response_unmapped_ext:
api_response_unmapped_ext = api_response_unmapped_ext['data']

elif endpoint.info['operationId'] == 'get-oauth-openid-clients':
for entry in api_response_unmapped_ext:
if entry.get('displayName'):
Expand Down

0 comments on commit cb1e40d

Please sign in to comment.