mirror of
https://github.com/bitwarden/browser
synced 2026-01-06 18:43:25 +00:00
[AC-2634] Add device-approvals approve command (#9476)
This commit is contained in:
@@ -49,14 +49,18 @@ export class DeviceApprovalProgram extends BaseProgram {
|
||||
|
||||
private approveCommand(): Command {
|
||||
return new Command("approve")
|
||||
.argument("<id>")
|
||||
.argument("<organizationId>", "The id of the organization")
|
||||
.argument("<requestId>", "The id of the request to approve")
|
||||
.description("Approve a pending request")
|
||||
.action(async (id: string) => {
|
||||
.action(async (organizationId: string, id: string) => {
|
||||
await this.exitIfFeatureFlagDisabled(FeatureFlag.BulkDeviceApproval);
|
||||
await this.exitIfLocked();
|
||||
|
||||
const cmd = new ApproveCommand();
|
||||
const response = await cmd.run(id);
|
||||
const cmd = new ApproveCommand(
|
||||
this.serviceContainer.organizationService,
|
||||
this.serviceContainer.organizationAuthRequestService,
|
||||
);
|
||||
const response = await cmd.run(organizationId, id);
|
||||
this.processResponse(response);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user