Skip to content

Commit

Permalink
added current_site parameter in user_can_login_on_requested_edly_orga…
Browse files Browse the repository at this point in the history
…nization() (#354)
  • Loading branch information
muhammadali124 authored Feb 9, 2023
1 parent 837d420 commit e6bf054
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions openedx/features/edly/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ def edly_panel_user_has_edly_org_access(request):
).exists()


def user_can_login_on_requested_edly_organization(request, user):
def user_can_login_on_requested_edly_organization(request, user, current_site=None):
"""
Check if user can login on the requested URL site.
Expand All @@ -322,7 +322,9 @@ def user_can_login_on_requested_edly_organization(request, user):
bool: Returns True if User can login, False otherwise
"""

current_site = request.site
if not current_site:
current_site = request.site

try:
edly_sub_org = EdlySubOrganization.objects.get(
Q(lms_site=current_site) |
Expand Down

0 comments on commit e6bf054

Please sign in to comment.