From a4b9c2da122b806504931c3e7e00a75315086c67 Mon Sep 17 00:00:00 2001 From: GitSumito Date: Mon, 15 Oct 2018 21:57:51 +0900 Subject: [PATCH] fixed https://github.com/getredash/redash/issues/2950 (#2951) * fixed https://github.com/getredash/redash/issues/2950 * fixed test code * Effective -> Active. thank you @kravets-levko --- redash/cli/users.py | 4 ++-- tests/test_cli.py | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/redash/cli/users.py b/redash/cli/users.py index 24789d4c..118b02df 100644 --- a/redash/cli/users.py +++ b/redash/cli/users.py @@ -245,5 +245,5 @@ def list(organization=None): if i > 0: print("-" * 20) - print("Id: {}\nName: {}\nEmail: {}\nOrganization: {}".format( - user.id, user.name.encode('utf-8'), user.email, user.org.name)) + print("Id: {}\nName: {}\nEmail: {}\nOrganization: {}\nActive: {}".format( + user.id, user.name.encode('utf-8'), user.email, user.org.name, not(user.is_disabled))) diff --git a/tests/test_cli.py b/tests/test_cli.py index cd75a4e3..cb95dc26 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -391,6 +391,7 @@ class UserCommandTests(BaseTestCase): Name: Fred Foobar Email: foobar@example.com Organization: Default + Active: True """ self.assertMultiLineEqual(result.output, textwrap.dedent(output).lstrip())