Skip to content
Closed
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion lms/envs/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@
}
# This is required for the migrations in oauth_dispatch.models
# otherwise it fails saying this attribute is not present in Settings
OAUTH2_PROVIDER_APPLICATION_MODEL = 'oauth2_provider.Application'
OAUTH2_PROVIDER_APPLICATION_MODEL = 'oauth_dispatch.ScopedApplication'

################################## TEMPLATE CONFIGURATION #####################################
# Mako templating
Expand Down
8 changes: 4 additions & 4 deletions openedx/core/djangoapps/oauth_dispatch/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from django.contrib.admin import ModelAdmin, site
from oauth2_provider import models

from .models import RestrictedApplication
from .models import RestrictedApplication, ScopedApplication


def reregister(model_class):
Expand Down Expand Up @@ -52,13 +52,13 @@ class DOTRefreshTokenAdmin(ModelAdmin):
search_fields = [u'token', u'user__username', u'access_token__token']


@reregister(models.Application)
class DOTApplicationAdmin(ModelAdmin):
@reregister(ScopedApplication)
class ScopedApplicationAdmin(ModelAdmin):
"""
Custom Application Admin
"""
list_display = [u'name', u'user', u'client_type', u'authorization_grant_type', u'client_id']
list_filter = [u'client_type', u'authorization_grant_type']
list_filter = [u'client_type', u'authorization_grant_type', u'skip_authorization']
raw_id_fields = [u'user']
search_fields = [u'name', u'user__username', u'client_id']

Expand Down
4 changes: 1 addition & 3 deletions openedx/core/djangoapps/oauth_dispatch/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,7 @@ def __unicode__(self):
"""
Return a unicode representation of this object.
"""
return u"<ScopedApplication '{name}'>".format(
name=self.name
)
return self.name

@property
def authorization_filters(self):
Expand Down