Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(jans-cli-tui): jansStatus to status for users #8301

Merged
merged 3 commits into from
Apr 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/overrides/main.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
<!--nightly docs may be used extensively by development team and contributors-->
<!--for testing purposes-->
<img referrerpolicy="no-referrer-when-downgrade"
src="placeholder-scarf-pixel-url"
src="https://static.scarf.sh/a.png?x-pxid=2c347abc-a9b4-4c4b-bdc9-2682edbcc0c9"
width="0" height="0"/>
{% endblock %}
8 changes: 4 additions & 4 deletions jans-cli-tui/cli_tui/plugins/070_users/edit_user_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def get_custom_attribute(attribute, multi=False):
return [] if multi else ''

if self.data:
active_checked = self.data.get('jansStatus', '').lower() == 'active'
active_checked = self.data.get('status', '').lower() == 'active'
else:
active_checked = True

Expand Down Expand Up @@ -153,7 +153,7 @@ def get_custom_attribute(attribute, multi=False):

for ca in self.data.get('customAttributes', []):

if ca['name'] in ('middleName', 'sn', 'jansStatus', 'nickname', 'jansActive', 'userPassword'):
if ca['name'] in ('middleName', 'sn', 'status', 'nickname', 'jansActive', 'userPassword'):
continue

claim_prop = self.get_claim_properties(ca['name'])
Expand Down Expand Up @@ -237,7 +237,7 @@ def add_claim(self) -> None:
for claim in common_data.jans_attributes:
if not claim['oxMultiValuedAttribute'] and claim['name'] in cur_claims:
continue
if claim['name'] in ('memberOf', 'userPassword', 'uid', 'jansStatus', 'jansActive', 'updatedAt'):
if claim['name'] in ('memberOf', 'userPassword', 'uid', 'status', 'jansActive', 'updatedAt'):
continue
if claim.get('status') == 'active':
claims_list.append((claim['name'], claim['displayName']))
Expand Down Expand Up @@ -297,7 +297,7 @@ def save_user(self) -> None:
user_info[key_] = self.data[key_]

status = raw_data.pop('active')
user_info['jansStatus'] = 'active' if status else 'inactive'
user_info['status'] = 'active' if status else 'inactive'

for key_ in raw_data:
multi_valued = False
Expand Down