Add revoke user token action

Implement revoking of user tokens to allow lost credentials to be
invalidated.
This commit is contained in:
Hornwitser committed 2023-02-21 22:39:23 +01:00
1 parent 5426d9b2bd
commit 2960db2cca
7 files changed
+107 -6

No files matched your search

+9
View File
@@ -1480,6 +1480,15 @@ userCommands.add(new libCommand.Command({
},
}));
userCommands.add(new libCommand.Command({
definition: ["revoke-token <name>", "Revoke token for user", (yargs) => {
yargs.positional("name", { describe: "Name of user to revoke token for", type: "string" });
}],
handler: async function(args, control) {
await libLink.messages.revokeUserToken.send(control, { name: args.name });
},
}));
userCommands.add(new libCommand.Command({
definition: ["set-admin <user>", "Promote or demote a user to admin", (yargs) => {
yargs.positional("user", { describe: "Name of user set admin status for", type: "string" });