Skip to content

Commit 837a600

Browse files
committed
Merge tag '26.1.1' into develop
Notifications refactor phase 2 hotfix part 1
2 parents f4c6c76 + e220c87 commit 837a600

6 files changed

Lines changed: 34 additions & 9 deletions

File tree

CHANGELOG

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@
22

33
We follow the CalVer (https://calver.org/) versioning scheme: YY.MINOR.MICRO.
44

5+
26.1.1 (2026-01-02)
6+
===================
7+
8+
- Notifications Refactor Phase 2 - UAT Hotfix Part 1
9+
* Fix reset password url
10+
* Fix logout query for new user confirmation url
11+
* Fix new user default notification subscription
12+
* Clean-up / Sync settings
13+
514
26.1.0 (2026-01-01)
615
===================
716

api/users/views.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -853,7 +853,7 @@ def get(self, request, *args, **kwargs):
853853
user_obj.verification_key_v2 = generate_verification_key(verification_type='password')
854854
user_obj.email_last_sent = timezone.now()
855855
user_obj.save()
856-
reset_link = f'{settings.DOMAIN}passwordreset/{user_obj._id}/{user_obj.verification_key_v2['token']}/'
856+
reset_link = f'{settings.DOMAIN}resetpassword/{user_obj._id}/{user_obj.verification_key_v2["token"]}/'
857857
if institutional:
858858
notification_type = NotificationType.Type.USER_FORGOT_PASSWORD_INSTITUTION
859859
else:

framework/auth/views.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -828,6 +828,7 @@ def send_confirm_email(user, email, renew=False, external_id_provider=None, exte
828828
destination=destination
829829
)
830830

831+
logout_query = ''
831832
try:
832833
merge_target = OSFUser.objects.get(emails__address=email)
833834
except OSFUser.DoesNotExist:
@@ -851,9 +852,11 @@ def send_confirm_email(user, email, renew=False, external_id_provider=None, exte
851852
'email': merge_target.email,
852853
}
853854
notification_type = NotificationType.Type.USER_CONFIRM_MERGE
855+
logout_query = '?logout=1'
854856
elif user.is_active:
855857
# Add email confirmation
856858
notification_type = NotificationType.Type.USER_CONFIRM_EMAIL
859+
logout_query = '?logout=1'
857860
elif campaign:
858861
# Account creation confirmation: from campaign
859862
notification_type = campaigns.email_template_for_campaign(campaign)
@@ -865,7 +868,7 @@ def send_confirm_email(user, email, renew=False, external_id_provider=None, exte
865868
destination_address=email,
866869
event_context={
867870
'user_fullname': user.fullname,
868-
'confirmation_url': f'{confirmation_url}?logout=1',
871+
'confirmation_url': f'{confirmation_url}{logout_query}',
869872
'can_change_preferences': False,
870873
'external_id_provider': external_id_provider,
871874
'osf_contact_email': settings.OSF_CONTACT_EMAIL,

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "OSF",
3-
"version": "26.1.0",
3+
"version": "26.1.1",
44
"description": "Facilitating Open Science",
55
"repository": "https://github.com/CenterForOpenScience/osf.io",
66
"author": "Center for Open Science",

website/mailchimp_utils.py

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
import hashlib
33
import mailchimp3
44
from mailchimp3.mailchimpclient import MailChimpError
5-
5+
from django.contrib.contenttypes.models import ContentType
66
from framework import sentry
77
from framework.celery_tasks import app
88
from framework.celery_tasks.handlers import queued_task
99
from framework.auth.signals import user_confirmed
1010
from osf.exceptions import OSFError
11-
from osf.models import OSFUser
11+
from osf.models import OSFUser, NotificationSubscription, NotificationType
1212
from website import settings
1313

1414

@@ -119,3 +119,20 @@ def subscribe_on_confirm(user):
119119
# Subscribe user to general OSF mailing list upon account confirmation
120120
if settings.ENABLE_EMAIL_SUBSCRIPTIONS:
121121
subscribe_mailchimp_async(settings.MAILCHIMP_GENERAL_LIST, user._id)
122+
123+
# Subscribe user to default notification subscriptions
124+
NotificationSubscription.objects.get_or_create(
125+
user=user,
126+
notification_type=NotificationType.Type.REVIEWS_SUBMISSION_STATUS.instance,
127+
content_type=ContentType.objects.get_for_model(user),
128+
object_id=user.id,
129+
defaults={'message_frequency': 'instantly'},
130+
)
131+
132+
NotificationSubscription.objects.get_or_create(
133+
user=user,
134+
notification_type=NotificationType.Type.USER_FILE_UPDATED.instance,
135+
content_type=ContentType.objects.get_for_model(user),
136+
object_id=user.id,
137+
defaults={'message_frequency': 'instantly'},
138+
)

website/settings/defaults.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -182,14 +182,10 @@ def parent_dir(path):
182182

183183
# Triggered emails
184184
OSF_HELP_LIST = 'Open Science Framework Help'
185-
PREREG_AGE_LIMIT = timedelta(weeks=12)
186-
PREREG_WAIT_TIME = timedelta(weeks=2)
187185
WAIT_BETWEEN_MAILS = timedelta(days=7)
188186
NO_ADDON_WAIT_TIME = timedelta(weeks=8)
189187
NO_LOGIN_WAIT_TIME = timedelta(weeks=4)
190-
WELCOME_OSF4M_WAIT_TIME = timedelta(weeks=2)
191188
NO_LOGIN_OSF4M_WAIT_TIME = timedelta(weeks=6)
192-
WELCOME_OSF4M_WAIT_TIME_GRACE = timedelta(days=12)
193189

194190
# Configuration for NO_LOGIN_EMAIL (NotificationType.Type.USER_NO_LOGIN)
195191
MAX_DAILY_NO_LOGIN_EMAILS = 1000

0 commit comments

Comments
 (0)