Skip to content

Commit 8f897fe

Browse files
authored
fix: Fix --exempt-from-2fa flag in create and update users and commands (#598)
1 parent 027d6b4 commit 8f897fe

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/commands/users/create.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class UsersCreateCommand extends BoxCommand {
2020
options.is_exempt_from_device_limits = flags['exempt-from-device-limits'];
2121
}
2222
if (flags.hasOwnProperty('exempt-from-2fa')) {
23-
options.is_exempt_login_verification = flags['exempt-from-2fa'];
23+
options.is_exempt_from_login_verification = flags['exempt-from-2fa'];
2424
}
2525
if (flags.hasOwnProperty('restrict-external-collab')) {
2626
options.is_external_collab_restricted = flags['restrict-external-collab'];

src/commands/users/update.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class UsersUpdateCommand extends BoxCommand {
1818
updates.is_exempt_from_device_limits = flags['exempt-from-device-limits'];
1919
}
2020
if (flags.hasOwnProperty('exempt-from-2fa')) {
21-
updates.is_exempt_login_verification = flags['exempt-from-2fa'];
21+
updates.is_exempt_from_login_verification = flags['exempt-from-2fa'];
2222
}
2323
if (flags.hasOwnProperty('restrict-external-collab')) {
2424
updates.is_external_collab_restricted = flags['restrict-external-collab'];

test/commands/users.test.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -659,11 +659,11 @@ describe('Users', () => {
659659
],
660660
'exempt from login verification flag': [
661661
'--exempt-from-2fa',
662-
{is_exempt_login_verification: true}
662+
{is_exempt_from_login_verification: true}
663663
],
664664
'no exempt from login verification flag': [
665665
'--no-exempt-from-2fa',
666-
{is_exempt_login_verification: false}
666+
{is_exempt_from_login_verification: false}
667667
],
668668
'external collab restricted flag': [
669669
'--restrict-external-collab',
@@ -842,11 +842,11 @@ describe('Users', () => {
842842
],
843843
'exempt from login verification flag': [
844844
'--exempt-from-2fa',
845-
{is_exempt_login_verification: true}
845+
{is_exempt_from_login_verification: true}
846846
],
847847
'no exempt from login verification flag': [
848848
'--no-exempt-from-2fa',
849-
{is_exempt_login_verification: false}
849+
{is_exempt_from_login_verification: false}
850850
],
851851
'external collab restricted flag': [
852852
'--restrict-external-collab',

0 commit comments

Comments
 (0)