@@ -360,6 +360,9 @@ module.exports = (db, server, userHandler, settingsHandler) => {
360360 requirePasswordChange : booleanSchema
361361 . default ( false )
362362 . description ( 'If true then requires the user to change password, useful if password for the account was autogenerated' ) ,
363+ require2faEnabled : booleanSchema
364+ . default ( false )
365+ . description ( 'If true then the account is flagged as requiring 2FA to be enabled' ) ,
363366
364367 imapMaxUpload : Joi . number ( ) . min ( 0 ) . default ( 0 ) . description ( 'How many bytes can be uploaded via IMAP during 24 hour' ) ,
365368 imapMaxDownload : Joi . number ( ) . min ( 0 ) . default ( 0 ) . description ( 'How many bytes can be downloaded via IMAP during 24 hour' ) ,
@@ -902,6 +905,9 @@ module.exports = (db, server, userHandler, settingsHandler) => {
902905 suspended : booleanSchema . required ( ) . description ( 'If true then the user can not authenticate' ) ,
903906 lastPwnedCheck : Joi . date ( ) . description ( 'Date when the last check of password against the Pwned passwords list was done' ) ,
904907 passwordPwned : booleanSchema . required ( ) . description ( 'Specifies whether the user password has been found in Pwned passwords list' ) ,
908+ require2faEnabled : booleanSchema
909+ . required ( )
910+ . description ( 'If true then the account is flagged as requiring 2FA to be enabled' ) ,
905911 requirePasswordChange : booleanSchema . required ( ) . description ( 'Indicates if account password has been reset and should be replaced' )
906912 } ) . $_setFlag ( 'objectName' , 'GetUserResponse' )
907913 }
@@ -1153,6 +1159,7 @@ module.exports = (db, server, userHandler, settingsHandler) => {
11531159 suspended : ! ! userData . suspended ,
11541160 lastPwnedCheck : userData . lastPwnedCheck ,
11551161 passwordPwned : ! ! userData . passwordPwned ,
1162+ require2faEnabled : ! ! userData . require2faEnabled ,
11561163 requirePasswordChange : ! ! userData . requirePasswordChange
11571164 } )
11581165 ) ;
@@ -1258,6 +1265,7 @@ module.exports = (db, server, userHandler, settingsHandler) => {
12581265 receivedMax : Joi . number ( ) . min ( 0 ) . description ( 'How many messages can be received from MX during 60 seconds' ) ,
12591266
12601267 disable2fa : booleanSchema . description ( 'If true, then disables 2FA for this user' ) ,
1268+ require2faEnabled : booleanSchema . description ( 'If true then the account is flagged as requiring 2FA to be enabled' ) ,
12611269
12621270 tags : Joi . array ( ) . items ( Joi . string ( ) . trim ( ) . max ( 128 ) ) . description ( 'A list of tags associated with this user' ) ,
12631271
0 commit comments