Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use oauth2_provider get model helper in logout #53

Merged
merged 1 commit into from
Oct 31, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading