@@ -136,7 +136,7 @@ impl EnrollmentServer {
136
136
let user = enrollment. fetch_user ( & self . pool ) . await ?;
137
137
let admin = enrollment. fetch_admin ( & self . pool ) . await ?;
138
138
139
- debug ! ( "Check is {} an active user." , user. username) ;
139
+ debug ! ( "Check if {} is an active user." , user. username) ;
140
140
if !user. is_active {
141
141
warn ! (
142
142
"Can't start enrollment for disabled user {}." ,
@@ -210,7 +210,7 @@ impl EnrollmentServer {
210
210
211
211
Ok ( response)
212
212
} else {
213
- debug ! ( "Invalid an enrollment token, the token does not have specified type." ) ;
213
+ debug ! ( "Invalid enrollment token, the token does not have specified type." ) ;
214
214
Err ( Status :: permission_denied ( "invalid token" ) )
215
215
}
216
216
}
@@ -236,26 +236,26 @@ impl EnrollmentServer {
236
236
debug ! ( "Ip address {}, device info {device_info:?}" , ip_address) ;
237
237
238
238
// check if password is strong enough
239
- debug ! ( "Verify is password strong enough to complete the activating user process." ) ;
239
+ debug ! ( "Verify if password is strong enough to complete the user activation process." ) ;
240
240
if let Err ( err) = check_password_strength ( & request. password ) {
241
241
error ! ( "Password not strong enough: {err}" ) ;
242
242
return Err ( Status :: invalid_argument ( "password not strong enough" ) ) ;
243
243
}
244
- debug ! ( "Password is strong enough to complete the activating user process." ) ;
244
+ debug ! ( "Password is strong enough to complete the user activation process." ) ;
245
245
246
246
// fetch related users
247
247
let mut user = enrollment. fetch_user ( & self . pool ) . await ?;
248
248
debug ! (
249
- "Fetching user {} data to check is the user has already password." ,
249
+ "Fetching user {} data to check if the user already has a password." ,
250
250
user. username
251
251
) ;
252
252
if user. has_password ( ) {
253
253
error ! ( "User {} already activated" , user. username) ;
254
254
return Err ( Status :: invalid_argument ( "user already activated" ) ) ;
255
255
}
256
- debug ! ( "User doesn't have a password yet. Continue activating user process..." ) ;
256
+ debug ! ( "User doesn't have a password yet. Continue user activation process..." ) ;
257
257
258
- debug ! ( "Verify is the user active or disabled." ) ;
258
+ debug ! ( "Verify if the user is active or disabled." ) ;
259
259
if !user. is_active {
260
260
warn ! (
261
261
"Can't finalize enrollment for disabled user {}" ,
@@ -278,7 +278,7 @@ impl EnrollmentServer {
278
278
error ! ( "Failed to update user {}: {err}" , user. username) ;
279
279
Status :: internal ( "unexpected error" )
280
280
} ) ?;
281
- debug ! ( "Updating user details ends with success." ) ;
281
+ debug ! ( "Updating user details ended with success." ) ;
282
282
283
283
// sync with LDAP
284
284
debug ! ( "Add user to ldap: {}." , self . ldap_feature_active) ;
@@ -294,7 +294,7 @@ impl EnrollmentServer {
294
294
error ! ( "Failed to get settings" ) ;
295
295
Status :: internal ( "unexpected error" )
296
296
} ) ?;
297
- debug ! ( "Successfully retrive settings." ) ;
297
+ debug ! ( "Successfully retrived settings." ) ;
298
298
299
299
// send welcome email
300
300
debug ! ( "Try to send welcome email..." ) ;
@@ -311,7 +311,7 @@ impl EnrollmentServer {
311
311
312
312
// send success notification to admin
313
313
debug ! (
314
- "Trying fetch admin data from the token to send notification about activating user."
314
+ "Trying to fetch admin data from the token to send notification about activating user."
315
315
) ;
316
316
let admin = enrollment. fetch_admin ( & mut * transaction) . await ?;
317
317
@@ -348,7 +348,7 @@ impl EnrollmentServer {
348
348
let user = enrollment. fetch_user ( & self . pool ) . await ?;
349
349
350
350
// add device
351
- debug ! ( "Verifying is user active or disabled." ) ;
351
+ debug ! ( "Verifying if user is active or disabled." ) ;
352
352
if !user. is_active {
353
353
error ! ( "Can't create device for a disabled user {}" , user. username) ;
354
354
return Err ( Status :: invalid_argument (
@@ -368,15 +368,15 @@ impl EnrollmentServer {
368
368
}
369
369
debug ! ( "Ip address {}, device info {device_info:?}" , ip_address) ;
370
370
371
- debug ! ( "Start validating pubkey for create device process..." ) ;
371
+ debug ! ( "Start validating pubkey for device creation process..." ) ;
372
372
Device :: validate_pubkey ( & request. pubkey ) . map_err ( |_| {
373
373
error ! ( "Invalid pubkey {}" , request. pubkey) ;
374
374
Status :: invalid_argument ( "invalid pubkey" )
375
375
} ) ?;
376
376
debug ! ( "Pubkey is validated." ) ;
377
377
378
378
// Make sure there is no device with the same pubkey, such state may lead to unexpected issues
379
- debug ! ( "Check is there a device that has the same pubey." ) ;
379
+ debug ! ( "Check if there is a device that has the same pubey." ) ;
380
380
if let Some ( device) = Device :: find_by_pubkey ( & self . pool , & request. pubkey )
381
381
. await
382
382
. map_err ( |_| {
0 commit comments