mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-19 11:01:15 +00:00
refactor(core): Extract all Auth-related User columns into a separate entity (#9557)
Co-authored-by: Ricardo Espinoza <ricardo@n8n.io>
This commit is contained in:
committed by
GitHub
parent
08902bf941
commit
5887ed6498
@@ -30,15 +30,13 @@ describe('UserService', () => {
|
||||
});
|
||||
|
||||
type MaybeSensitiveProperties = Partial<
|
||||
Pick<User, 'password' | 'mfaSecret' | 'mfaRecoveryCodes' | 'updatedAt' | 'authIdentities'>
|
||||
Pick<User, 'password' | 'updatedAt' | 'authIdentities'>
|
||||
>;
|
||||
|
||||
// to prevent typechecking from blocking assertions
|
||||
const publicUser: MaybeSensitiveProperties = await userService.toPublic(mockUser);
|
||||
|
||||
expect(publicUser.password).toBeUndefined();
|
||||
expect(publicUser.mfaSecret).toBeUndefined();
|
||||
expect(publicUser.mfaRecoveryCodes).toBeUndefined();
|
||||
expect(publicUser.updatedAt).toBeUndefined();
|
||||
expect(publicUser.authIdentities).toBeUndefined();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user