File tree 5 files changed +40
-0
lines changed
5 files changed +40
-0
lines changed Original file line number Diff line number Diff line change 3
3
- [ push] Fixed bug where IOS credentials get mixed up while sending messages from different apps at the same time
4
4
- [ push] Fixed bug where it crashes in connection pool growth because of a type mismatch in an if condition
5
5
6
+ Features:
7
+ - [ user-management] Global admins can now disable 2FA for individual users
8
+
6
9
Dependencies:
7
10
- Bump express from 4.21.1 to 4.21.2
8
11
- Bump mocha from 10.2.0 to 10.8.2
Original file line number Diff line number Diff line change 215
215
callback ( err . responseJSON . result ) ;
216
216
} ) ;
217
217
} ;
218
+ countlyUserManagement . disableTwoFactorAuth = function ( id , callback ) {
219
+ return $ . ajax ( {
220
+ type : "GET" ,
221
+ url : countlyGlobal . path + "/i/two-factor-auth" ,
222
+ data : {
223
+ method : "admin_disable" ,
224
+ uid : id
225
+ } ,
226
+ success : function ( ) {
227
+ callback ( ) ;
228
+ } ,
229
+ error : function ( err ) {
230
+ callback ( err . responseJSON . result ) ;
231
+ }
232
+ } ) ;
233
+ } ;
218
234
219
235
} ) ( ( window . countlyUserManagement = window . countlyUserManagement || { } ) ) ;
Original file line number Diff line number Diff line change 65
65
} ,
66
66
roleMap : roleMap ,
67
67
showLogs : countlyGlobal . plugins . indexOf ( 'systemlogs' ) > - 1 ,
68
+ twoFactorAuth : countlyGlobal . plugins . indexOf ( 'two-factor-auth' ) > - 1 ,
68
69
tableDynamicCols : tableDynamicCols ,
69
70
userManagementPersistKey : 'userManagement_table_' + countlyCommon . ACTIVE_APP_ID ,
70
71
isGroupPluginEnabled : isGroupPluginEnabled
114
115
}
115
116
} ,
116
117
methods : {
118
+ is2faEnabled : function ( row ) {
119
+ return countlyGlobal . member . global_admin && this . twoFactorAuth && row . two_factor_auth && row . two_factor_auth . enabled ;
120
+ } ,
117
121
handleCommand : function ( command , index ) {
118
122
switch ( command ) {
119
123
case "delete-user" :
157
161
} ) ;
158
162
} ) ;
159
163
break ;
164
+ case 'disable-2fa' :
165
+ countlyUserManagement . disableTwoFactorAuth ( index , function ( err ) {
166
+ if ( err ) {
167
+ CountlyHelpers . notify ( {
168
+ message : CV . i18n ( 'two-factor-auth.faildisable_title' ) ,
169
+ type : 'error'
170
+ } ) ;
171
+ return ;
172
+ }
173
+ CountlyHelpers . notify ( {
174
+ message : CV . i18n ( 'two-factor-auth.disable_title' ) ,
175
+ type : 'success'
176
+ } ) ;
177
+ } ) ;
178
+ break ;
160
179
}
161
180
} ,
162
181
handleSubmitFilter : function ( newFilter ) {
Original file line number Diff line number Diff line change @@ -131,6 +131,7 @@ <h4>{{i18n('management-users.view-title')}}</h4>
131
131
< el-dropdown-item v-if ="showLogs " command ="show-logs " :data-test-id ="'datatable-users-more-button-view-logs-select-' + rowScope.$index "> {{ i18n('management-users.view-user-logs') }}</ el-dropdown-item >
132
132
< el-dropdown-item command ="reset-logins " :data-test-id ="'datatable-users-more-button-reset-logins-select-' + rowScope.$index "> {{ i18n('management-users.reset-failed-logins') }}</ el-dropdown-item >
133
133
< el-dropdown-item command ="delete-user " :data-test-id ="'datatable-users-more-button-delete-user-select-' + rowScope.$index "> {{ i18n('management-users.delete-user') }}</ el-dropdown-item >
134
+ < el-dropdown-item v-if ="is2faEnabled(rowScope.row) " command ="disable-2fa " :data-test-id ="'datatable-users-more-button-disable-2fa-select-' + rowScope.$index "> {{ i18n('management-users.disable-2fa-user') }}</ el-dropdown-item >
134
135
</ cly-more-options >
135
136
</ template >
136
137
</ el-table-column >
Original file line number Diff line number Diff line change @@ -908,6 +908,7 @@ management-users.no-role = No role
908
908
management-users.create-user = Create User
909
909
management-users.delete-user = Delete User
910
910
management-users.edit = Click to edit
911
+ management-users.disable-2fa-user = Disable 2FA
911
912
management-users.all-roles = All roles
912
913
management-users.not-logged-in-yet = Not logged in yet
913
914
management-users.close = Click to close
You can’t perform that action at this time.
0 commit comments