Skip to content
This repository has been archived by the owner on Mar 15, 2018. It is now read-only.

Commit

Permalink
Merge pull request #3443 from ngokevin/commcors
Browse files Browse the repository at this point in the history
fix note list cors
  • Loading branch information
ngokevin committed Nov 16, 2015
2 parents 899e677 + 8d775a8 commit 3d9d8b3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions mkt/comm/tests/test_views.py
Expand Up @@ -473,6 +473,10 @@ def _grant_perms(self):
self.grant_permission(self.profile, 'Apps:Review')
self.grant_permission(self.profile, 'ContentTools:AddonReview')

def test_cors(self):
res = self.client.get(self.url)
self.assertCORS(res, 'get')

def test_no_perm(self):
res = self.client.get(self.url)
eq_(res.status_code, 403)
Expand Down
2 changes: 1 addition & 1 deletion mkt/comm/views.py
Expand Up @@ -192,7 +192,7 @@ def create(self, request, *args, **kwargs):
status=status.HTTP_201_CREATED)


class NoteListView(ListAPIView, MarketplaceView):
class NoteListView(ListAPIView, MarketplaceView, CORSMixin):
serializer_class = NoteSerializer
authentication_classes = [RestOAuthAuthentication,
RestSharedSecretAuthentication]
Expand Down

0 comments on commit 3d9d8b3

Please sign in to comment.