Skip to content

Commit

Permalink
use oauth2_provider get model helper in logout
Browse files Browse the repository at this point in the history
  • Loading branch information
Travis McKinney committed Oct 31, 2024
1 parent 47f0a89 commit 02048aa
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions openedx/core/djangoapps/user_authn/views/logout.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
from django.contrib.auth import logout
from django.utils.http import urlencode
from django.views.generic import TemplateView
from oauth2_provider.models import Application
# @medality_custom
from oauth2_provider.models import get_application_model

from openedx.core.djangoapps.safe_sessions.middleware import mark_user_change_as_expected
from openedx.core.djangoapps.user_authn.cookies import delete_logged_in_cookies
Expand Down Expand Up @@ -132,7 +133,8 @@ def get_context_data(self, **kwargs):

# Add the logout URIs for IDAs that the user was logged into (according to the session). This line is specific
# to DOP.
uris += Application.objects.filter(client_id__in=self.oauth_client_ids,
# @medality_custom
uris += get_application_model().objects.filter(client_id__in=self.oauth_client_ids,
redirect_uris__isnull=False).values_list('redirect_uris', flat=True)

# Add the extra logout URIs from settings. This is added as a stop-gap solution for sessions that were
Expand Down

0 comments on commit 02048aa

Please sign in to comment.