diff --git a/addons/base/views.py b/addons/base/views.py index 92f930c085b..e759e153f02 100644 --- a/addons/base/views.py +++ b/addons/base/views.py @@ -582,7 +582,6 @@ def create_waterbutler_log(payload, **kwargs): user=user, subscribed_object=node, event_context={ - 'user_fullname': user.fullname, 'action': payload['action'], 'source_node': source_node._id, 'source_node_title': source_node.title, diff --git a/addons/boa/tasks.py b/addons/boa/tasks.py index 283867d8489..4aa3bd56736 100644 --- a/addons/boa/tasks.py +++ b/addons/boa/tasks.py @@ -187,14 +187,11 @@ async def submit_to_boa_async(host, username, password, user_guid, project_guid, user=user, event_context={ 'user_fullname': user.fullname, - 'query_file_name': query_file_name, 'query_file_full_path': file_full_path, 'output_file_name': output_file_name, 'job_id': boa_job.id, 'project_url': project_url, 'boa_job_list_url': boa_settings.BOA_JOB_LIST_URL, - 'boa_support_email': boa_settings.BOA_SUPPORT_EMAIL, - 'osf_support_email': osf_settings.OSF_SUPPORT_EMAIL, } ) return BoaErrorCode.NO_ERROR @@ -214,7 +211,6 @@ def handle_boa_error(message, code, username, fullname, project_url, query_file_ event_context={ 'user_fullname': fullname, 'code': code, - 'query_file_name': query_file_name, 'file_size': file_size, 'message': message, 'max_file_size': boa_settings.MAX_SUBMISSION_SIZE, diff --git a/admin/users/views.py b/admin/users/views.py index 1771c0fea0d..860ceda3054 100644 --- a/admin/users/views.py +++ b/admin/users/views.py @@ -188,7 +188,6 @@ def post(self, request, *args, **kwargs): event_context={ 'user_fullname': user.fullname, 'contact_email': OSF_SUPPORT_EMAIL, - 'can_change_preferences': False, } ) else: diff --git a/api/institutions/authentication.py b/api/institutions/authentication.py index 7824b3380a4..49d557752f8 100644 --- a/api/institutions/authentication.py +++ b/api/institutions/authentication.py @@ -352,7 +352,6 @@ def authenticate(self, request): user=user, event_context={ 'domain': DOMAIN, - 'osf_support_email': OSF_SUPPORT_EMAIL, 'user_fullname': user.fullname, 'storage_flag_is_active': flag_is_active(request, features.STORAGE_I18N), }, @@ -368,9 +367,7 @@ def authenticate(self, request): event_context={ 'user_fullname': user.fullname, 'email_to_add': email_to_add, - 'domain': DOMAIN, 'osf_support_email': OSF_SUPPORT_EMAIL, - 'storage_flag_is_active': flag_is_active(request, features.STORAGE_I18N), }, save=False, ) @@ -390,10 +387,8 @@ def authenticate(self, request): 'user_fullname': user.fullname, 'user_username': user.username, 'user__id': user._id, - 'duplicate_user_fullname': duplicate_user.fullname, 'duplicate_user_username': duplicate_user.username, 'duplicate_user__id': duplicate_user._id, - 'domain': DOMAIN, 'osf_support_email': OSF_SUPPORT_EMAIL, }, ) diff --git a/api/nodes/views.py b/api/nodes/views.py index ae94133e5ca..4495b26715a 100644 --- a/api/nodes/views.py +++ b/api/nodes/views.py @@ -1069,9 +1069,7 @@ def perform_create(self, serializer): user=user, subscribed_object=node, event_context={ - 'domain': settings.DOMAIN, 'node_title': node.title, - 'can_change_preferences': False, }, ) raise exc @@ -1082,9 +1080,7 @@ def perform_create(self, serializer): event_context={ 'domain': settings.DOMAIN, 'node_title': node.title, - 'fork_title': fork.title, 'fork__id': fork._id, - 'can_change_preferences': False, }, ) diff --git a/api/providers/tasks.py b/api/providers/tasks.py index a3b89cb9dc4..bb43727e949 100644 --- a/api/providers/tasks.py +++ b/api/providers/tasks.py @@ -653,13 +653,11 @@ def bulk_upload_finish_job(upload, row_count, success_count, draft_errors, appro user=initiator, event_context={ 'user_fullname': initiator.fullname, - 'initiator_fullname': initiator.fullname, 'auto_approval': auto_approval, 'count': row_count, 'total': row_count, 'pending_submissions_url': f'{get_registration_provider_submissions_url(provider)}?status=pending', 'draft_errors': draft_errors, - 'approval_errors': approval_errors, 'successes': success_count, 'failures': len(draft_errors), 'osf_support_email': settings.OSF_SUPPORT_EMAIL, diff --git a/api/requests/serializers.py b/api/requests/serializers.py index cca3f713094..67d15b58089 100644 --- a/api/requests/serializers.py +++ b/api/requests/serializers.py @@ -196,10 +196,9 @@ def make_node_institutional_access_request(self, node, validated_data) -> NodeRe 'sender_absolute_url': sender.absolute_url, 'node_absolute_url': node_request.target.absolute_url, 'node_title': node_request.target.title, - 'recipient_fullname': recipient.username if recipient else None, + 'recipient_username': recipient.username if recipient else None, 'comment': comment, 'domain': settings.DOMAIN, - 'institution_name': institution.name if institution else None, }, email_context={ 'bcc_addr': [sender.username] if validated_data['bcc_sender'] else None, diff --git a/api/users/serializers.py b/api/users/serializers.py index aeb8fdeb656..c4b47737cef 100644 --- a/api/users/serializers.py +++ b/api/users/serializers.py @@ -739,7 +739,6 @@ def update(self, instance, validated_data): event_context={ 'user_fullname': user.fullname, 'new_address': user.username, - 'can_change_preferences': False, 'osf_contact_email': settings.OSF_CONTACT_EMAIL, }, ) diff --git a/api/users/services.py b/api/users/services.py index 9237f0b1d9f..e4d1bedf17c 100644 --- a/api/users/services.py +++ b/api/users/services.py @@ -22,7 +22,6 @@ def send_password_reset_email(user, email, verification_type='password', institu destination_address=email, event_context={ 'reset_link': reset_link, - 'can_change_preferences': False, **mail_kwargs, }, ) diff --git a/api/users/views.py b/api/users/views.py index 47a4e52fc17..2a41b832680 100644 --- a/api/users/views.py +++ b/api/users/views.py @@ -650,7 +650,6 @@ def create(self, request, *args, **kwargs): 'user_username': user.username, 'user_absolute_url': user.absolute_url, 'user__id': user._id, - 'can_change_preferences': False, }, ) user.email_last_sent = timezone.now() @@ -863,7 +862,6 @@ def get(self, request, *args, **kwargs): user=user_obj, message_frequency='instantly', event_context={ - 'can_change_preferences': False, 'reset_link': reset_link, }, ) @@ -1171,7 +1169,6 @@ def _process_external_identity(self, user, external_identity, service_url): message_frequency='instantly', event_context={ 'user_fullname': user.fullname, - 'can_change_preferences': False, 'external_id_provider': provider, }, ) @@ -1492,7 +1489,6 @@ def post(self, request, *args, **kwargs): user=user, message_frequency='instantly', event_context={ - 'can_change_preferences': False, 'external_id_provider': provider.name, }, ) diff --git a/framework/auth/views.py b/framework/auth/views.py index 0338654fac3..886ee5655bb 100644 --- a/framework/auth/views.py +++ b/framework/auth/views.py @@ -280,8 +280,6 @@ def _forgot_password_post(notificaton_type, reset_route, institutional=False): user=user_obj, event_context={ 'reset_link': reset_link, - 'can_change_preferences': False, - 'osf_contact_email': settings.OSF_CONTACT_EMAIL, }, ) @@ -664,7 +662,6 @@ def external_login_confirm_email_get(auth, uid, token): event_context={ 'user_fullname': user.fullname, 'external_id_provider': provider, - 'can_change_preferences': False, 'osf_contact_email': settings.OSF_CONTACT_EMAIL, }, ) @@ -869,7 +866,6 @@ def send_confirm_email(user, email, renew=False, external_id_provider=None, exte event_context={ 'user_fullname': user.fullname, 'confirmation_url': f'{confirmation_url}{logout_query}', - 'can_change_preferences': False, 'external_id_provider': external_id_provider, 'osf_contact_email': settings.OSF_CONTACT_EMAIL, 'osf_support_email': settings.OSF_SUPPORT_EMAIL, diff --git a/notifications/tasks.py b/notifications/tasks.py index 2f4cf004ba6..f2e50083a12 100644 --- a/notifications/tasks.py +++ b/notifications/tasks.py @@ -108,8 +108,6 @@ def send_user_email_task(self, user_id, notification_ids, **kwargs): event_context = { 'notifications': rendered_notifications, - 'user_fullname': user.fullname, - 'can_change_preferences': False } NotificationType.Type.USER_DIGEST.instance.emit( @@ -252,7 +250,6 @@ def send_moderator_email_task(self, user_id, notification_ids, provider_content_ event_context = { 'notifications': rendered_notifications, 'user_fullname': user.fullname, - 'can_change_preferences': False, 'notification_settings_url': notification_settings_url, 'reviews_withdrawal_url': withdrawals_url, 'reviews_submissions_url': submissions_url, diff --git a/osf/management/commands/check_crossref_dois.py b/osf/management/commands/check_crossref_dois.py index 348a92d429a..e0d8a29077d 100644 --- a/osf/management/commands/check_crossref_dois.py +++ b/osf/management/commands/check_crossref_dois.py @@ -126,7 +126,6 @@ def report_stuck_dois(dry_run=True): NotificationType.Type.USER_CROSSREF_DOI_PENDING.instance.emit( destination_address=settings.OSF_SUPPORT_EMAIL, event_context={ - 'pending_doi_count': preprints_with_pending_dois.count(), 'time_since_published': time_since_published.days, 'guids': guids, } diff --git a/osf/management/commands/deactivate_requested_accounts.py b/osf/management/commands/deactivate_requested_accounts.py index 8a4eeaf9ad1..d0763835348 100644 --- a/osf/management/commands/deactivate_requested_accounts.py +++ b/osf/management/commands/deactivate_requested_accounts.py @@ -27,7 +27,6 @@ def deactivate_requested_accounts(dry_run=True): 'user__id': user._id, 'user_absolute_url': user.absolute_url, 'user_username': user.username, - 'can_change_preferences': False, } ) else: @@ -40,7 +39,6 @@ def deactivate_requested_accounts(dry_run=True): event_context={ 'user_fullname': user.fullname, 'contact_email': OSF_SUPPORT_EMAIL, - 'can_change_preferences': False, } ) diff --git a/osf/management/commands/send_storage_exceeded_announcement.py b/osf/management/commands/send_storage_exceeded_announcement.py index 8c4a687f3ce..d05309b5fe2 100644 --- a/osf/management/commands/send_storage_exceeded_announcement.py +++ b/osf/management/commands/send_storage_exceeded_announcement.py @@ -46,7 +46,6 @@ def main(json_file, dry=False): event_context={ 'public_nodes': public_nodes, 'private_nodes': private_nodes, - 'can_change_preferences': False, } ) except Exception: diff --git a/osf/models/collection_submission.py b/osf/models/collection_submission.py index 1e646745dc4..d5f2d052e32 100644 --- a/osf/models/collection_submission.py +++ b/osf/models/collection_submission.py @@ -139,15 +139,12 @@ def _notify_moderators_pending(self, event_data): user=user, subscribed_object=self.collection.provider, event_context={ - 'provider_id': self.collection.provider.id, - 'submitter_fullname': self.creator.fullname, 'requester_fullname': event_data.kwargs.get('user').fullname, 'requester_contributor_names': ''.join(self.guid.referent.contributors.values_list('fullname', flat=True)), 'localized_timestamp': str(timezone.now()), 'message': f'submitted "{self.guid.referent.title}".', 'reviews_submission_url': f'{DOMAIN}reviews/registries/{self.guid.referent._id}/{self.guid.referent._id}', 'is_request_email': False, - 'is_initiator': self.creator == user, 'profile_image_url': user.profile_image_url(), 'logo': self.collection.provider._id if self.collection.provider and not self.collection.provider.is_default else settings.OSF_PREPRINTS_LOGO, @@ -309,21 +306,14 @@ def _notify_removed(self, event_data): **event_context_base, 'requester_contributor_names': ''.join( self.guid.referent.contributors.values_list('fullname', flat=True)), - 'is_admin': node.has_permission(contributor, ADMIN), 'rejection_justification': event_data.kwargs.get('comment'), - 'collections_title': self.collection.title, 'collection_provider_name': self.collection.provider.name, 'collection_provider__id': self.collection.provider._id, - 'remover_absolute_url': user.get_absolute_url() if user is not None else None, 'node_absolute_url': node.absolute_url, 'collection_provider': self.collection.provider.name, 'collections_link': DOMAIN + 'collections/' + self.collection.provider._id, 'user_fullname': contributor.fullname, - 'is_request_email': False, - 'message': '', - 'localized_timestamp': str(timezone.now()), - 'reviews_submission_url': f'{DOMAIN}reviews/registries/{self.guid.referent._id}/{self.guid.referent._id}', }, ) elif is_admin and self.collection.provider: @@ -332,21 +322,12 @@ def _notify_removed(self, event_data): user=contributor, event_context={ **event_context_base, - 'requester_contributor_names': ''.join( - self.guid.referent.contributors.values_list('fullname', flat=True)), - 'localized_timestamp': str(timezone.now()), 'user_fullname': contributor.fullname, - 'collections_title': self.collection.title, 'collection_provider_name': self.collection.provider.name, - 'collection_provider__id': self.collection.provider._id, 'collection_provider': self.collection.provider.name, 'collections_link': DOMAIN + 'collections/' + self.collection.provider._id, 'node_absolute_url': node.get_absolute_url(), - 'is_request_email': False, - 'message': '', 'is_admin': node.has_permission(contributor, ADMIN), - 'reviews_submission_url': f'{DOMAIN}reviews/registries/{self.guid.referent._id}/{self.guid.referent._id}', - }, ) @@ -392,29 +373,18 @@ def _notify_cancel(self, event_data): user=contributor, subscribed_object=self.collection, event_context={ - 'requester_contributor_names': ''.join( - node.contributors.values_list('fullname', flat=True)), - 'profile_image_url': user.profile_image_url(), 'user_fullname': contributor.fullname, - 'requester_fullname': self.creator.fullname, 'is_admin': node.has_permission(contributor, ADMIN), 'node_title': node.title, 'node_absolute_url': node.get_absolute_url(), 'remover_fullname': user.fullname if user else '', 'remover_absolute_url': user.get_absolute_url() if user else '', - 'localized_timestamp': str(timezone.now()), 'collections_link': collections_link, - 'collection_title': self.collection.title, 'collection_provider_name': collection_provider_name, 'node_absolute_url"': node.get_absolute_url(), 'collection_provider': collection_provider_name, 'domain': settings.DOMAIN, - 'is_request_email': False, - 'message': '', 'osf_contact_email': settings.OSF_CONTACT_EMAIL, - 'reviews_submission_url': f'{DOMAIN}reviews/registries/{self.guid.referent._id}/{self.guid.referent._id}', - 'logo': self.collection.provider._id if - self.collection.provider and not self.collection.provider.is_default else settings.OSF_PREPRINTS_LOGO, }, ) diff --git a/osf/models/mixins.py b/osf/models/mixins.py index 53573bd45b4..95169dfd690 100644 --- a/osf/models/mixins.py +++ b/osf/models/mixins.py @@ -2327,7 +2327,6 @@ def suspend_spam_user(self, user): event_context={ 'user_fullname': user.fullname, 'osf_support_email': settings.OSF_SUPPORT_EMAIL, - 'can_change_preferences': False } ) user.save() diff --git a/osf/models/preprint.py b/osf/models/preprint.py index 9938a0e7147..b1d8c3f01b9 100644 --- a/osf/models/preprint.py +++ b/osf/models/preprint.py @@ -1075,24 +1075,18 @@ def _send_preprint_confirmation(self, auth): subscribed_object=self.provider, user=recipient, event_context={ - 'domain': settings.DOMAIN, 'user_fullname': recipient.fullname, 'referrer_fullname': recipient.fullname, 'reviewable_title': self.title, 'no_future_emails': self.provider.allow_submissions, 'reviewable_absolute_url': self.absolute_url, 'reviewable_provider_name': self.provider.name, - 'reviewable_provider__id': self.provider._id, 'workflow': self.provider.reviews_workflow, 'provider_url': f'{self.provider.domain or settings.DOMAIN}preprints/' f'{(self.provider._id if not self.provider.domain else '').strip('/')}', - 'provider_contact_email': self.provider.email_contact or settings.OSF_CONTACT_EMAIL, - 'provider_support_email': self.provider.email_support or settings.OSF_SUPPORT_EMAIL, 'is_creator': True, 'provider_name': 'OSF Preprints' if self.provider.name == 'Open Science Framework' else self.provider.name, - 'logo': settings.OSF_PREPRINTS_LOGO if self.provider._id == 'osf' else self.provider._id, 'document_type': self.provider.preprint_word, - 'notify_comment': not self.provider.reviews_comments_private }, ) diff --git a/osf/models/user.py b/osf/models/user.py index 8b8c0ede502..a6e025e0392 100644 --- a/osf/models/user.py +++ b/osf/models/user.py @@ -1077,7 +1077,6 @@ def set_password(self, raw_password, notify=True): event_context={ 'domain': website_settings.DOMAIN, 'user_fullname': self.fullname, - 'can_change_preferences': False, 'osf_contact_email': website_settings.OSF_CONTACT_EMAIL } ) diff --git a/osf/utils/notifications.py b/osf/utils/notifications.py index 8808ef3b243..e514fbf0aed 100644 --- a/osf/utils/notifications.py +++ b/osf/utils/notifications.py @@ -118,21 +118,14 @@ def notify_edit_comment(resource, user, action, states, *args, **kwargs): def notify_reject_withdraw_request(resource, action, *args, **kwargs): context = get_email_template_context(resource) context['requester_fullname'] = action.creator.fullname - context['referrer_fullname'] = action.creator.fullname - context['force_withdrawal'] = False context['notify_comment'] = not resource.provider.reviews_comments_private - context['reviewable_withdrawal_justification'] = resource.withdrawal_justification for contributor in resource.contributors.all(): - context['user_fullname'] = contributor.fullname context['contributor_fullname'] = contributor.fullname - context['is_requester'] = action.creator == contributor context['comment'] = action.comment NotificationType.Type.NODE_WITHDRAWAl_REQUEST_REJECTED.instance.emit( user=contributor, event_context={ - 'is_requester': contributor == action.creator, - 'ever_public': getattr(resource, 'ever_public', resource.is_public), **context }, ) diff --git a/scripts/stuck_registration_audit.py b/scripts/stuck_registration_audit.py index 36eca5e52ab..7060a6acd19 100644 --- a/scripts/stuck_registration_audit.py +++ b/scripts/stuck_registration_audit.py @@ -101,7 +101,6 @@ def main(): 'broken_registrations_count': len(broken_registrations), 'attachment_name': filename, 'attachement_content': output.getvalue(), - 'can_change_preferences': False } ) diff --git a/website/archiver/utils.py b/website/archiver/utils.py index 0eafd0460b3..5633d485d81 100644 --- a/website/archiver/utils.py +++ b/website/archiver/utils.py @@ -35,25 +35,19 @@ def send_archiver_size_exceeded_mails(src, user, stat_result, url): event_context={ 'user_fullname': user.fullname, 'user__id': user._id, - 'src__id': src._id, 'src_url': src.url, 'src_title': src.title, 'stat_result': stat_result, 'url': url, 'max_archive_size': MAX_ARCHIVE_SIZE / 1024 ** 3, - 'can_change_preferences': False, } ) NotificationType.Type.USER_ARCHIVE_JOB_EXCEEDED.instance.emit( user=user, subscribed_object=user, event_context={ - 'user_fullname': user.fullname, - 'user__id': user._id, 'src_title': src.title, 'src_url': src.url, - 'max_archive_size': MAX_ARCHIVE_SIZE / 1024 ** 3, - 'can_change_preferences': False, } ) @@ -64,7 +58,6 @@ def send_archiver_copy_error_mails(src, user, results, url): NotificationType.Type.DESK_ARCHIVE_JOB_COPY_ERROR.instance.emit( destination_address=settings.OSF_SUPPORT_EMAIL, event_context={ - 'domain': settings.DOMAIN, 'user_fullname': user.fullname, 'user__id': user._id, 'src__id': src._id, @@ -72,20 +65,15 @@ def send_archiver_copy_error_mails(src, user, results, url): 'src_title': src.title, 'results': results, 'url': url, - 'can_change_preferences': False, } ) NotificationType.Type.USER_ARCHIVE_JOB_COPY_ERROR.instance.emit( user=user, event_context={ 'domain': settings.DOMAIN, - 'user_fullname': user.fullname, - 'user__id': user._id, - 'src__id': src._id, 'src_url': src.url, 'src_title': src.title, - 'results': results, - 'can_change_preferences': False, + } ) @@ -95,11 +83,13 @@ def send_archiver_file_not_found_mails(src, user, results, url): NotificationType.Type.DESK_ARCHIVE_JOB_FILE_NOT_FOUND.instance.emit( destination_address=settings.OSF_SUPPORT_EMAIL, event_context={ - 'user': user.id, - 'src': src._id, + 'domain': settings.DOMAIN, + 'src': src, + 'src_title': src.title, + 'user__id': user._id, + 'user_fullname': user.fullname, + 'src__id': src._id, 'results': results, - 'url': url, - 'can_change_preferences': False, } ) NotificationType.Type.USER_ARCHIVE_JOB_FILE_NOT_FOUND.instance.emit( @@ -110,7 +100,6 @@ def send_archiver_file_not_found_mails(src, user, results, url): 'src_title': src.title, 'src_url': src.url, 'results': results, - 'can_change_preferences': False, } ) @@ -122,27 +111,18 @@ def send_archiver_uncaught_error_mails(src, user, results, url): event_context={ 'user_fullname': user.fullname, 'user__id': user._id, - 'user_username': user.username, 'src_title': src.title, - 'src__id': src._id, 'src_url': src.url, - 'src': src._id, - 'results': [str(error) for error in results], 'url': url, - 'can_change_preferences': False, + 'src__id': src._id, + 'results': results, } ) NotificationType.Type.USER_ARCHIVE_JOB_UNCAUGHT_ERROR.instance.emit( user=user, event_context={ - 'user_fullname': user.fullname, - 'user__id': user._id, 'src_title': src.title, - 'src__id': src._id, 'src_url': src.url, - 'src': src._id, - 'results': [str(error) for error in results], - 'can_change_preferences': False, } ) diff --git a/website/profile/views.py b/website/profile/views.py index fb03f52fa5c..2c868e9fa15 100644 --- a/website/profile/views.py +++ b/website/profile/views.py @@ -193,7 +193,6 @@ def update_user(auth): event_context={ 'user_fullname': user.fullname, 'new_address': username, - 'can_change_preferences': False, 'osf_contact_email': settings.OSF_CONTACT_EMAIL, } ) @@ -804,7 +803,6 @@ def request_export(auth): 'user_username': user.username, 'user_absolute_url': user.absolute_url, 'user__id': user._id, - 'can_change_preferences': False, } ) user.email_last_sent = timezone.now() diff --git a/website/project/views/contributor.py b/website/project/views/contributor.py index 6bacb1b158d..2d2d38068d6 100644 --- a/website/project/views/contributor.py +++ b/website/project/views/contributor.py @@ -454,7 +454,6 @@ def send_claim_registered_email(claimer, unclaimed_user, node, throttle=24 * 360 'referrer_fullname': referrer.fullname, 'user_fullname': unclaimed_record['name'], 'node_title': node.title, - 'can_change_preferences': False, 'osf_contact_email': settings.OSF_CONTACT_EMAIL, } ) @@ -463,13 +462,9 @@ def send_claim_registered_email(claimer, unclaimed_user, node, throttle=24 * 360 subscribed_object=claimer, user=claimer, event_context={ - 'claim_url': claim_url, 'user_fullname': unclaimed_record['name'], - 'referrer_username': referrer.username, 'referrer_fullname': referrer.fullname, 'node_title': node.title, - 'can_change_preferences': False, - 'osf_contact_email': settings.OSF_CONTACT_EMAIL, } ) @@ -547,7 +542,7 @@ def send_claim_email( 'user_fullname': unclaimed_record['name'], 'node_title': node.title, 'logo': logo, - 'can_change_preferences': False, + 'node_absolute_url': node.absolute_url, 'osf_contact_email': settings.OSF_CONTACT_EMAIL, } ) @@ -559,14 +554,9 @@ def send_claim_email( user=referrer, destination_address=email, event_context={ - 'user_fullname': referrer.id, - 'referrer_name': referrer.fullname, + 'user_fullname': unclaimed_record['name'], 'referrer_fullname': referrer.fullname, - 'fullname': unclaimed_record['name'], - 'node_url': node.url, - 'logo': logo, 'claim_url': claim_url, - 'can_change_preferences': False, 'domain': settings.DOMAIN, 'node_absolute_url': node.absolute_url, 'node_title': node.title, @@ -642,6 +632,7 @@ def notify_added_contributor(resource, contributor, notification_type, auth=None subscribed_object=resource, event_context={ 'user_fullname': contributor.fullname, + 'referrer_fullname': referrer_name, 'referrer_text': referrer_name + ' has added you as a contributor' if referrer_name else 'You have been added', 'registry_text': resource.provider.name if resource.provider else 'OSF Registry', 'referrer_name': referrer_name, @@ -655,7 +646,6 @@ def notify_added_contributor(resource, contributor, notification_type, auth=None 'node_provider__id': getattr(resource.provider, '_id', None), 'node_absolute_url': resource.absolute_url, 'node_has_permission_admin': resource.has_permission(user=contributor, permission='admin'), - 'can_change_preferences': False, 'logo': logo, 'osf_contact_email': settings.OSF_CONTACT_EMAIL, 'preprint_list': ''.join(f"- {p['absolute_url']}\n" for p in serialize_preprints(resource, user=None)) if isinstance(resource, Node) else '- (none)\n', diff --git a/website/templates/invite_default.html.mako b/website/templates/invite_default.html.mako index f739f11ad7e..9bf188212ef 100644 --- a/website/templates/invite_default.html.mako +++ b/website/templates/invite_default.html.mako @@ -8,7 +8,7 @@ %> Hello ${user_fullname},

- You have been added by ${referrer_name} as a contributor to the project ${node_title} on the Open Science Framework.
+ You have been added by ${referrer_fullname} as a contributor to the project ${node_title} on the Open Science Framework.

Click here to set a password for your account.

diff --git a/website/templates/node_request_institutional_access_request.html.mako b/website/templates/node_request_institutional_access_request.html.mako index 8ef9529f0ee..8cfae57cdd0 100644 --- a/website/templates/node_request_institutional_access_request.html.mako +++ b/website/templates/node_request_institutional_access_request.html.mako @@ -3,7 +3,7 @@ <%def name="content()"> - Hello ${recipient_fullname}, + Hello ${recipient_username},

${sender_fullname} has requested access to ${node_title}.