@@ -285,32 +285,6 @@ export class RecommendationProvider {
285
285
}
286
286
}
287
287
288
- /**
289
- * Check set password recommendation
290
- * @param redisClient
291
- */
292
-
293
- async determineSetPasswordRecommendation (
294
- redisClient : Redis | Cluster ,
295
- ) : Promise < Recommendation > {
296
- if ( await this . checkAuth ( redisClient ) ) {
297
- return { name : RECOMMENDATION_NAMES . SET_PASSWORD } ;
298
- }
299
-
300
- try {
301
- const users = await redisClient . sendCommand (
302
- new Command ( 'acl' , [ 'list' ] , { replyEncoding : 'utf8' } ) ,
303
- ) as string [ ] ;
304
-
305
- const nopassUser = users . some ( ( user ) => user . split ( ' ' ) [ 3 ] === 'nopass' ) ;
306
-
307
- return nopassUser ? { name : RECOMMENDATION_NAMES . SET_PASSWORD } : null ;
308
- } catch ( err ) {
309
- this . logger . error ( 'Can not determine set password recommendation' , err ) ;
310
- return null ;
311
- }
312
- }
313
-
314
288
/**
315
289
* Check RTS recommendation
316
290
* @param redisClient
@@ -414,6 +388,32 @@ export class RecommendationProvider {
414
388
}
415
389
}
416
390
391
+ /**
392
+ * Check set password recommendation
393
+ * @param redisClient
394
+ */
395
+
396
+ async determineSetPasswordRecommendation (
397
+ redisClient : Redis | Cluster ,
398
+ ) : Promise < Recommendation > {
399
+ if ( await this . checkAuth ( redisClient ) ) {
400
+ return { name : RECOMMENDATION_NAMES . SET_PASSWORD } ;
401
+ }
402
+
403
+ try {
404
+ const users = await redisClient . sendCommand (
405
+ new Command ( 'acl' , [ 'list' ] , { replyEncoding : 'utf8' } ) ,
406
+ ) as string [ ] ;
407
+
408
+ const nopassUser = users . some ( ( user ) => user . split ( ' ' ) [ 3 ] === 'nopass' ) ;
409
+
410
+ return nopassUser ? { name : RECOMMENDATION_NAMES . SET_PASSWORD } : null ;
411
+ } catch ( err ) {
412
+ this . logger . error ( 'Can not determine set password recommendation' , err ) ;
413
+ return null ;
414
+ }
415
+ }
416
+
417
417
private async checkAuth ( redisClient : Redis | Cluster ) : Promise < boolean > {
418
418
try {
419
419
await redisClient . sendCommand (
0 commit comments