Skip to content

Commit

Permalink
adding displayEmail field with AES_key encryption
Browse files Browse the repository at this point in the history
  • Loading branch information
Damirkhon committed Dec 6, 2022
1 parent 1b28ca1 commit c75d207
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions girderformindlogger/models/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def initialize(self):
}, language='none')
self.exposeFields(level=AccessType.READ, fields=(
'_id', 'login', 'public', 'displayName', 'firstName', 'lastName',
'admin', 'email', 'created'))
'admin', 'email', 'created', 'displayEmail'))
self.exposeFields(level=AccessType.ADMIN, fields=(
'size', 'status', 'emailVerified', 'creatorId'))

Expand All @@ -55,7 +55,8 @@ def initialize(self):
self.initAES([
('firstName', 64),
('lastName', 64),
('displayName', 64)
('displayName', 64),
('displayEmail', 64)
])

events.bind('model.user.save.created',
Expand Down Expand Up @@ -508,7 +509,9 @@ def createUser(self, login, password, displayName="", email="",
} for gi in list(Group().find(query={"queue": email}))
] if len(email) else [],
'email_encrypted': encryptEmail,
'accountName': ''
'accountName': '',
'displayEmail': email,

}
if encryptEmail:
if len(email) == 0 or not mail_utils.validateEmailAddress(email):
Expand Down Expand Up @@ -847,3 +850,4 @@ def get_users_by_ids(self, user_ids):
'timezone', 'deviceId'
]
)

0 comments on commit c75d207

Please sign in to comment.