feature: Adds support for service accounts.
This commit is contained in:
parent
0e3335c4c2
commit
41013f46bb
2 changed files with 7 additions and 2 deletions
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
||||||
1.0.0
|
1.0.1
|
|
@ -43,6 +43,8 @@ export async function run(
|
||||||
"Asks for a password. Hides output",
|
"Asks for a password. Hides output",
|
||||||
);
|
);
|
||||||
|
|
||||||
|
addCommand.option("-s, --service-account, --service", "Turns the user into a service account");
|
||||||
|
|
||||||
addCommand.action(
|
addCommand.action(
|
||||||
async (
|
async (
|
||||||
username: string,
|
username: string,
|
||||||
|
@ -51,6 +53,7 @@ export async function run(
|
||||||
options: {
|
options: {
|
||||||
password?: string;
|
password?: string;
|
||||||
askPassword?: boolean;
|
askPassword?: boolean;
|
||||||
|
isServiceAccount?: boolean;
|
||||||
},
|
},
|
||||||
) => {
|
) => {
|
||||||
if (!options.password && !options.askPassword) {
|
if (!options.password && !options.askPassword) {
|
||||||
|
@ -89,6 +92,8 @@ export async function run(
|
||||||
username,
|
username,
|
||||||
email,
|
email,
|
||||||
password,
|
password,
|
||||||
|
|
||||||
|
allowUnsafeGlobalTokens: options.isServiceAccount
|
||||||
});
|
});
|
||||||
|
|
||||||
if (response.status != 200) {
|
if (response.status != 200) {
|
||||||
|
@ -103,7 +108,7 @@ export async function run(
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
println("User created successfully.\n");
|
println("User created successfully.\nToken: %s\n", response.data.token);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue