Rendere l'output di phicli json #3
|
@ -63,8 +63,10 @@ def adduser(uid):
|
||||||
|
|
||||||
# Check
|
# Check
|
||||||
user = get_user_by_uid(client, uid)
|
user = get_user_by_uid(client, uid)
|
||||||
print()
|
if not SHOW_PASSWORDS:
|
||||||
print(pp(user))
|
user.pop("password")
|
||||||
|
|
||||||
|
print(JSON_ENC.encode(sanitize(user)))
|
||||||
|
|
||||||
|
|
||||||
@cli.register("delete an user", ["user identifier"])
|
@cli.register("delete an user", ["user identifier"])
|
||||||
|
@ -89,7 +91,7 @@ def showgroup(cn):
|
||||||
print("Group {} not found".format(gcn))
|
print("Group {} not found".format(gcn))
|
||||||
return
|
return
|
||||||
|
|
||||||
print(pp(group))
|
print(JSON_ENC.encode(sanitize(group)))
|
||||||
|
|
||||||
|
|
||||||
@cli.register("list all groups")
|
@cli.register("list all groups")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user