Skip to content

Commit

Permalink
Fix production - settings mismatch on permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
ldeluigi committed May 10, 2023
1 parent adb6c6b commit e0d59ea
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion backend/backend/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@
# Use Django's standard `django.contrib.auth` permissions,
# or allow read-only access for unauthenticated users.
'DEFAULT_PERMISSION_CLASSES': [
# 'rest_framework.permissions.DjangoModelPermissionsOrAnonReadOnly'
'rest_framework.permissions.DjangoModelPermissionsOrAnonReadOnly'
],
'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.LimitOffsetPagination',
'PAGE_SIZE': 100,
Expand Down
4 changes: 3 additions & 1 deletion backend/spellbook/views/find_my_combos.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
from collections import defaultdict
from django.db.models import Q
from rest_framework import parsers
from rest_framework.decorators import api_view, parser_classes
from rest_framework.decorators import api_view, parser_classes, permission_classes
from rest_framework.response import Response
from rest_framework.request import Request
from rest_framework.permissions import AllowAny
from spellbook.models import Card, Variant, CardInVariant
from spellbook.variants.list_utils import merge_identities
from spellbook.serializers import VariantSerializer
Expand Down Expand Up @@ -65,6 +66,7 @@ def parse(self, stream, media_type=None, parser_context=None) -> Deck:

@api_view(http_method_names=['GET', 'POST'])
@parser_classes([JsonDeckListParser, PlainTextDeckListParser])
@permission_classes([AllowAny])
def find_my_combos(request: Request) -> Response:
deck: Deck | dict = request.data
if isinstance(deck, dict):
Expand Down

0 comments on commit e0d59ea

Please sign in to comment.