Skip to content

Commit

Permalink
fix: DRF authentication methods in settings
Browse files Browse the repository at this point in the history
  • Loading branch information
francesco-filicetti committed Oct 31, 2024
1 parent 2902c3b commit 383f7b2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
8 changes: 4 additions & 4 deletions uniticket/api_rest/views/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class GroupViewSet(viewsets.ModelViewSet):


class uniTicketROGenericList(generics.ListAPIView):
authentication_classes = [AuthorizationToken, SessionAuthentication]
# authentication_classes = [AuthorizationToken, SessionAuthentication]
permission_classes = [permissions.IsAuthenticated]


Expand All @@ -71,9 +71,9 @@ class TicketAPIBaseView(APIView):
"""

# TODO: AgID MoDI also here?
authentication_classes = [
AuthorizationToken, SessionAuthentication
]
# authentication_classes = [
# AuthorizationToken, SessionAuthentication
# ]
permission_classes = [permissions.IsAuthenticated]

def get_messages(self):
Expand Down
4 changes: 4 additions & 0 deletions uniticket/uni_ticket_project/settingslocal.py.example
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,10 @@ INTERNAL_IPS = (
)

REST_FRAMEWORK = {
'DEFAULT_AUTHENTICATION_CLASSES': [
'rest_framework.authentication.SessionAuthentication',
'rest_framework.authentication.TokenAuthentication',
],
'DEFAULT_PERMISSION_CLASSES': [
'rest_framework.permissions.IsAuthenticated'
],
Expand Down

0 comments on commit 383f7b2

Please sign in to comment.