File tree 1 file changed +14
-8
lines changed
1 file changed +14
-8
lines changed Original file line number Diff line number Diff line change @@ -32,10 +32,13 @@ function remove2fa(event) {
32
32
alert ( "Required parameters not found!" ) ;
33
33
return false ;
34
34
}
35
- _post ( `${ BASE_URL } /admin/users/${ id } /remove-2fa` ,
36
- "2FA removed correctly" ,
37
- "Error removing 2FA"
38
- ) ;
35
+ const confirmed = confirm ( `Are you sure you want to remove 2FA for "${ email } "?` ) ;
36
+ if ( confirmed ) {
37
+ _post ( `${ BASE_URL } /admin/users/${ id } /remove-2fa` ,
38
+ "2FA removed correctly" ,
39
+ "Error removing 2FA"
40
+ ) ;
41
+ }
39
42
}
40
43
41
44
function deauthUser ( event ) {
@@ -46,10 +49,13 @@ function deauthUser(event) {
46
49
alert ( "Required parameters not found!" ) ;
47
50
return false ;
48
51
}
49
- _post ( `${ BASE_URL } /admin/users/${ id } /deauth` ,
50
- "Sessions deauthorized correctly" ,
51
- "Error deauthorizing sessions"
52
- ) ;
52
+ const confirmed = confirm ( `Are you sure you want to deauthorize sessions for "${ email } "?` ) ;
53
+ if ( confirmed ) {
54
+ _post ( `${ BASE_URL } /admin/users/${ id } /deauth` ,
55
+ "Sessions deauthorized correctly" ,
56
+ "Error deauthorizing sessions"
57
+ ) ;
58
+ }
53
59
}
54
60
55
61
function disableUser ( event ) {
You can’t perform that action at this time.
0 commit comments