Skip to content

Commit 02f4a46

Browse files
authored
Merge pull request #11734 from ihorsokhanexoft/es2-develop-merge-conflicts
Es2-develop merge conflicts
2 parents a34867a + 3056d14 commit 02f4a46

107 files changed

Lines changed: 2375 additions & 271 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/actions/gen-report/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ runs:
44
using: "composite"
55
steps:
66
- name: Archive code coverage results
7-
uses: actions/upload-artifact@v4
7+
uses: actions/upload-artifact@v7
88
with:
99
name: ${{github.job}} HTML REPORT
1010
path: report.html
1111
- name: Generate Report
12-
uses: dorny/test-reporter@v2
12+
uses: dorny/test-reporter@v3
1313
if: success() || failure() # run this step even if previous step failed
1414
with:
1515
name: ${{github.job}} REPORT # Name of the check run which will be created

.github/actions/start-build/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ runs:
44
using: "composite"
55
steps:
66
- id: cache-objects
7-
uses: actions/cache@v4
7+
uses: actions/cache@v5
88
with:
99
path: ~/.cache
1010
key: reqs_${{ hashFiles('poetry.lock') }}
@@ -16,7 +16,7 @@ runs:
1616
with:
1717
ELASTICSEARCH6_ARCHIVE: ${{ env.ELASTICSEARCH6_ARCHIVE }}
1818
- name: Set up Python 3.12
19-
uses: actions/setup-python@v5
19+
uses: actions/setup-python@v6
2020
with:
2121
python-version: '3.12'
2222
- name: Install lxml

.github/workflows/test-build.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ jobs:
1717
build-cache:
1818
runs-on: ubuntu-22.04
1919
steps:
20-
- uses: actions/checkout@v2
20+
- uses: actions/checkout@v6
2121
- id: cache-objects
22-
uses: actions/cache@v4
22+
uses: actions/cache@v5
2323
with:
2424
path: ~/.cache
2525
key: reqs_${{ hashFiles('poetry.lock') }}
@@ -50,7 +50,7 @@ jobs:
5050
# Maps tcp port 5432 on service container to the host
5151
- 5432:5432
5252
steps:
53-
- uses: actions/checkout@v2
53+
- uses: actions/checkout@v6
5454
- uses: ./.github/actions/start-build
5555
- name: Run tests
5656
run: poetry run python3 -m invoke test-ci-addons --junit
@@ -77,7 +77,7 @@ jobs:
7777
# Maps tcp port 5432 on service container to the host
7878
- 5432:5432
7979
steps:
80-
- uses: actions/checkout@v2
80+
- uses: actions/checkout@v6
8181
- uses: ./.github/actions/start-build
8282
- name: Run tests
8383
run: poetry run python3 -m invoke test-ci-website --junit
@@ -104,7 +104,7 @@ jobs:
104104
# Maps tcp port 5432 on service container to the host
105105
- 5432:5432
106106
steps:
107-
- uses: actions/checkout@v2
107+
- uses: actions/checkout@v6
108108
- uses: ./.github/actions/start-build
109109
- name: NVM & yarn install
110110
run: poetry run python3 -m invoke assets --dev
@@ -133,7 +133,7 @@ jobs:
133133
# Maps tcp port 5432 on service container to the host
134134
- 5432:5432
135135
steps:
136-
- uses: actions/checkout@v2
136+
- uses: actions/checkout@v6
137137
- uses: ./.github/actions/start-build
138138
- name: Run tests
139139
run: poetry run python3 -m invoke test-ci-api2 --junit
@@ -161,7 +161,7 @@ jobs:
161161
# Maps tcp port 5432 on service container to the host
162162
- 5432:5432
163163
steps:
164-
- uses: actions/checkout@v2
164+
- uses: actions/checkout@v6
165165
- uses: ./.github/actions/start-build
166166
- name: Run tests
167167
run: poetry run python3 -m invoke test-ci-api3-and-osf --junit
@@ -194,7 +194,7 @@ jobs:
194194
- 1025:1025
195195
- 8025:8025
196196
steps:
197-
- uses: actions/checkout@v2
197+
- uses: actions/checkout@v6
198198
- uses: ./.github/actions/start-build
199199
- name: Run tests
200200
run: poetry run python3 -m invoke test-ci-mailhog -n 1 --junit
@@ -222,7 +222,7 @@ jobs:
222222
# Maps tcp port 5432 on service container to the host
223223
- 5432:5432
224224
steps:
225-
- uses: actions/checkout@v2
225+
- uses: actions/checkout@v6
226226
- uses: ./.github/actions/start-build
227227
- name: Run tests
228228
run: poetry run python3 -m invoke test-ci-scripts -n 1 --junit

CHANGELOG

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

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

5+
26.9.0 (2026-05-07)
6+
===================
7+
8+
- OSF4I In-progress SSO Project - BE Piece
9+
10+
26.8.2 (2026-05-06)
11+
===================
12+
13+
- Hotfix to avoid 502 on creating preprint version from rejected version
14+
15+
26.8.1 (2026-04-30)
16+
===================
17+
18+
- Hotfix for registrations sometimes fail to become public after approval
19+
20+
26.8.0 (2026-04-23)
21+
===================
22+
23+
- Miscellaneous improvements and bug fixes
24+
25+
26.7.1 (2026-04-22)
26+
===================
27+
28+
- Hotfix to improve notifications and logging for failed registrations
29+
30+
26.7.0 (2026-04-08)
31+
===================
32+
33+
- ORCiD Integration Project - BE Part
34+
535
26.6.3 (2026-04-02)
636
===================
737

admin/base/urls.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
re_path(r'^cedar_metadata_templates/', include('admin.cedar.urls', namespace='cedar_metadata_templates')),
3838
re_path(r'^draft_registrations/', include('admin.draft_registrations.urls', namespace='draft_registrations')),
3939
re_path(r'^files/', include('admin.files.urls', namespace='files')),
40+
re_path(r'^share_reindex/', include('admin.share_reindex.urls', namespace='share_reindex')),
4041
]),
4142
),
4243
]

admin/institutions/forms.py

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from django import forms
2-
from osf.models import Institution
2+
from osf.models.institution import Institution, SSOAvailability
33

44

55
class InstitutionForm(forms.ModelForm):
@@ -10,6 +10,25 @@ class Meta:
1010
'is_deleted', 'contributors', 'storage_regions',
1111
]
1212

13+
def clean(self):
14+
super().clean()
15+
16+
if hasattr(self, 'cleaned_data') and self.changed_data:
17+
if not self.cleaned_data['delegation_protocol']:
18+
if self.cleaned_data['sso_availability'] != SSOAvailability.UNAVAILABLE.value:
19+
self.add_error(None, 'SSO availability must be set to "Unavailable" when no delegation protocol is configured.')
20+
21+
elif self.cleaned_data['deactivated']:
22+
if self.cleaned_data['sso_availability'] != SSOAvailability.HIDDEN.value:
23+
self.add_error(None, 'SSO availability must be set to "Hidden" when the institution is deactivated.')
24+
25+
else:
26+
if self.cleaned_data['sso_availability'] not in [
27+
SSOAvailability.PUBLIC.value,
28+
SSOAvailability.HIDDEN.value
29+
]:
30+
self.add_error(None, 'SSO availability must be set to "Public" or "Hidden" when delegation protocol is configured.')
31+
1332

1433
class InstitutionalMetricsAdminRegisterForm(forms.Form):
1534
""" A form that finds an existing OSF User, and grants permissions to that

admin/institutions/views.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ def get_context_data(self, *args, **kwargs):
5656
institution_dict = model_to_dict(institution)
5757
kwargs.setdefault('page_number', self.request.GET.get('page', '1'))
5858
kwargs['institution'] = institution_dict
59+
kwargs['cas_login_url'] = institution.cas_login_url
5960
kwargs['logo_path'] = institution.logo_path
6061
kwargs['banner_path'] = institution.banner_path
6162
fields = institution_dict
@@ -117,6 +118,17 @@ def get_context_data(self, *args, **kwargs):
117118
def get_success_url(self, *args, **kwargs):
118119
return reverse_lazy('institutions:detail', kwargs={'institution_id': self.kwargs.get('institution_id')})
119120

121+
def post(self, request, *args, **kwargs):
122+
# Override `post` method in `django.views.generic.edit.ProcessFormView` due to custom behavior
123+
self.object = self.get_object()
124+
form = self.get_form()
125+
if form.is_valid():
126+
return self.form_valid(form)
127+
else:
128+
for error in form.non_field_errors():
129+
messages.error(request, error)
130+
return redirect('institutions:detail', institution_id=self.kwargs.get('institution_id'))
131+
120132

121133
class InstitutionExport(PermissionRequiredMixin, View):
122134
permission_required = 'osf.view_institution'

admin/management/urls.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,7 @@
1919
re_path(r'^empty_metadata_dataarchive_registration_bulk_resync', views.EmptyMetadataDataarchiveRegistrationBulkResync.as_view(),
2020
name='empty-metadata-dataarchive-registration-bulk-resync'),
2121
re_path(r'^sync_notification_templates', views.SyncNotificationTemplates.as_view(),
22-
name='sync_notification_templates')
22+
name='sync_notification_templates'),
23+
re_path(r'^remove_orcid_from_user_social', views.RemoveOrcidFromUserSocial.as_view(),
24+
name='remove_orcid_from_user_social')
2325
]

admin/management/views.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
from osf.management.commands.fetch_cedar_metadata_templates import ingest_cedar_metadata_templates
1313
from osf.management.commands.sync_doi_metadata import sync_doi_metadata, sync_doi_empty_metadata_dataarchive_registrations
1414
from osf.management.commands.populate_notification_types import populate_notification_types
15+
from osf.management.commands.remove_orcid_from_user_social import remove_orcid_from_user_social
1516
from scripts.find_spammy_content import manage_spammy_content
1617
from django.urls import reverse
1718
from django.shortcuts import redirect
@@ -181,3 +182,11 @@ def post(self, request):
181182
populate_notification_types()
182183
messages.success(request, 'Notification templates have been successfully synced.')
183184
return redirect(reverse('management:commands'))
185+
186+
187+
class RemoveOrcidFromUserSocial(ManagementCommandPermissionView):
188+
189+
def post(self, request):
190+
remove_orcid_from_user_social()
191+
messages.success(request, 'Orcid from user social have been successfully removed.')
192+
return redirect(reverse('management:commands'))

admin/nodes/urls.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
re_path(r'^flagged_spam$', views.NodeFlaggedSpamList.as_view(), name='flagged-spam'),
99
re_path(r'^known_spam$', views.NodeKnownSpamList.as_view(), name='known-spam'),
1010
re_path(r'^known_ham$', views.NodeKnownHamList.as_view(), name='known-ham'),
11+
re_path(r'^embargo_report/$', views.EmbargoReportView.as_view(), name='embargo-report'),
1112
re_path(r'^doi_backlog_list/$', views.DoiBacklogListView.as_view(), name='doi-backlog-list'),
1213
re_path(r'^approval_backlog_list/$', views.ApprovalBacklogListView.as_view(), name='approval-backlog-list'),
1314
re_path(r'^confirm_approve_backlog_list/$', views.ConfirmApproveBacklogView.as_view(), name='confirm-approve-backlog-list'),
@@ -51,4 +52,7 @@
5152
re_path(r'^(?P<guid>[a-z0-9]+)/system_tags/(?P<tag_id>[a-z0-9]+)/remove/$', views.NodeRemoveSystemTag.as_view(), name='remove-system-tag'),
5253
re_path(r'^(?P<guid>[a-z0-9]+)/update_permissions/$', views.NodeUpdatePermissionsView.as_view(), name='update-permissions'),
5354
re_path(r'^(?P<guid>[a-z0-9]+)/remove_file/$', views.NodeRemoveFileView.as_view(), name='remove-file'),
55+
re_path(r'^(?P<guid>[a-z0-9]+)/add_osfstorage_file/$', views.NodeAddOsfStorageFileView.as_view(), name='add-osfstorage-file'),
56+
re_path(r'^(?P<guid>[a-z0-9]+)/remove_osfstorage_file/$', views.NodeRemoveOsfStorageFileView.as_view(), name='remove-osfstorage-file'),
57+
5458
]

0 commit comments

Comments
 (0)