Skip to content

Commit 01ac213

Browse files
Refactor SSO availability logic to simplify delegation protocol checks
1 parent ca6affc commit 01ac213

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

osf/models/institution.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ def deactivate(self):
251251
"""
252252
if not self.deactivated:
253253
self.deactivated = timezone.now()
254-
if not self.delegation_protocol or self.delegation_protocol == IntegrationType.AFFILIATION_VIA_ORCID.value:
254+
if not self.delegation_protocol:
255255
self.sso_availability = SSOAvailability.UNAVAILABLE.value
256256
else:
257257
self.sso_availability = SSOAvailability.HIDDEN.value
@@ -270,7 +270,7 @@ def reactivate(self):
270270
"""
271271
if self.deactivated:
272272
self.deactivated = None
273-
if not self.delegation_protocol or self.delegation_protocol == IntegrationType.AFFILIATION_VIA_ORCID.value:
273+
if not self.delegation_protocol:
274274
self.sso_availability = SSOAvailability.UNAVAILABLE.value
275275
else:
276276
self.sso_availability = SSOAvailability.HIDDEN.value

0 commit comments

Comments
 (0)