Skip to content

Commit

Permalink
Fix authentication on Claim api
Browse files Browse the repository at this point in the history
  • Loading branch information
pxwxnvermx committed Sep 15, 2023
1 parent 834aa92 commit 4f471dd
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions commcare_connect/opportunity/api/views.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from oauth2_provider.contrib.rest_framework import OAuth2Authentication, TokenHasReadWriteScope
from rest_framework import viewsets
from rest_framework.generics import get_object_or_404
from rest_framework.permissions import IsAuthenticated
Expand Down Expand Up @@ -61,8 +60,7 @@ def get_queryset(self):


class ClaimOpportunityView(APIView):
authentication_classes = [OAuth2Authentication]
permission_classes = [TokenHasReadWriteScope]
permission_classes = [IsAuthenticated]

def post(self, *args, **kwargs):
opportunity_access = get_object_or_404(OpportunityAccess, user=self.request.user, opportunity=kwargs.get("pk"))
Expand Down

0 comments on commit 4f471dd

Please sign in to comment.