mirror of
https://github.com/samba-team/samba.git
synced 2025-12-23 00:23:53 +03:00
netcmd: models: Rename username to account_name for consistency
When creating the User model initially, "username" was the only field that was inconsistently named, it maps to "sAMAccountName". It should really have been account "account_name". There is also a field "account_type" and should be similarly named to "account_name". Basically the naming of fields should always be consistent, breaking the rule for one field only was a mistake. Signed-off-by: Rob van der Linde <rob@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
This commit is contained in:
committed by
Andrew Bartlett
parent
e70b875139
commit
076bc6ee1d
@@ -55,10 +55,10 @@ class cmd_service_account_list(Command):
|
||||
raise CommandError(e)
|
||||
|
||||
if output_format == "json":
|
||||
self.print_json({account.username: account for account in accounts})
|
||||
self.print_json({account.account_name: account for account in accounts})
|
||||
else:
|
||||
for account in accounts:
|
||||
print(account.username, file=self.outf)
|
||||
print(account.account_name, file=self.outf)
|
||||
|
||||
|
||||
class cmd_service_account_view(Command):
|
||||
|
||||
Reference in New Issue
Block a user