make it possible to get email address

This commit is contained in:
Brian Bonnlander 2022-06-02 23:30:08 +00:00
parent b79d68c477
commit 79a5a45ba0
2 changed files with 9 additions and 3 deletions

4
.gitignore vendored
View File

@ -13,4 +13,6 @@ development.ini
node_modules node_modules
*.project *.project
.eggs .eggs
.vscode/ .idea/
.vscode/

View File

@ -450,9 +450,13 @@ def harvest_get_notifications_recipients(context, data_dict):
'capacity': 'admin' 'capacity': 'admin'
}) })
# Get access to email address by running action as admin user
context['user'] = 'admin'
for member in members: for member in members:
member_details = p.toolkit.get_action( member_details = p.toolkit.get_action('user_show')(context, {
'user_show')(context, {'id': member[0]}) 'id': member[0],
'include_plugin_extras': True
})
if member_details.get('email', None): if member_details.get('email', None):
recipients.append({ recipients.append({