user: return 2fa status for the UI

This commit is contained in:
Girish Ramakrishnan
2021-04-14 21:46:35 -07:00
parent 5833d6ed5d
commit c3e14cd11f

View File

@@ -133,7 +133,7 @@ function validatePassword(password) {
// remove all fields that should never be sent out via REST API
function removePrivateFields(user) {
return _.pick(user, 'id', 'username', 'email', 'fallbackEmail', 'displayName', 'groupIds', 'active', 'source', 'role');
return _.pick(user, 'id', 'username', 'email', 'fallbackEmail', 'displayName', 'groupIds', 'active', 'source', 'role', 'createdAt', 'twoFactorAuthenticationEnabled');
}
// remove all fields that Non-privileged users must not see