|
|
|
|
@@ -17,16 +17,16 @@ from jobposting.serializers import (
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
class MyUserViewSet(viewsets.ModelViewSet):
|
|
|
|
|
authentication_classes = [OAuth2ClientCredentialAuthentication]
|
|
|
|
|
# permission_classes = [TokenHasReadWriteScope] # test only
|
|
|
|
|
authentication_classes = [OAuth2Authentication]
|
|
|
|
|
permission_classes = [TokenHasReadWriteScope]
|
|
|
|
|
queryset = MyUser.objects.all()
|
|
|
|
|
serializer_class = MyUserSerializer
|
|
|
|
|
# required_scope = ['main']
|
|
|
|
|
required_scope = ['main']
|
|
|
|
|
# permission_classes = [permissions.IsAuthenticated]
|
|
|
|
|
|
|
|
|
|
class JobListingViewSet(viewsets.ModelViewSet):
|
|
|
|
|
authentication_classes = [OAuth2ClientCredentialAuthentication]
|
|
|
|
|
# permission_classes = [TokenHasReadWriteScope] # test only
|
|
|
|
|
authentication_classes = [OAuth2Authentication]
|
|
|
|
|
permission_classes = [TokenHasReadWriteScope] # test only
|
|
|
|
|
queryset = JobListing.objects.all()
|
|
|
|
|
serializer_class = JobListingSerializer
|
|
|
|
|
required_scope = ['main']
|
|
|
|
|
@@ -52,11 +52,11 @@ class JobListingViewSet(viewsets.ModelViewSet):
|
|
|
|
|
serializer.save(anonymous_user_data=anonymous_user_data)
|
|
|
|
|
|
|
|
|
|
class SkillLevelsViewSet(viewsets.ModelViewSet):
|
|
|
|
|
authentication_classes = [OAuth2ClientCredentialAuthentication]
|
|
|
|
|
# permission_classes = [TokenHasReadWriteScope] # test only
|
|
|
|
|
authentication_classes = [OAuth2Authentication]
|
|
|
|
|
permission_classes = [TokenHasReadWriteScope] # test only
|
|
|
|
|
queryset = SkillLevels.objects.all()
|
|
|
|
|
serializer_class = SkillLevelsSerializer
|
|
|
|
|
# required_scope = ['main']
|
|
|
|
|
required_scope = ['main']
|
|
|
|
|
|
|
|
|
|
# permission_classes = [permissions.IsAuthenticatedOrReadOnly]
|
|
|
|
|
|
|
|
|
|
@@ -73,16 +73,16 @@ class SkillLevelsViewSet(viewsets.ModelViewSet):
|
|
|
|
|
return super().create(request, *args, **kwargs)
|
|
|
|
|
|
|
|
|
|
class CompanyLogoViewSet(viewsets.ModelViewSet):
|
|
|
|
|
authentication_classes = [OAuth2ClientCredentialAuthentication]
|
|
|
|
|
# permission_classes = [TokenHasReadWriteScope]
|
|
|
|
|
authentication_classes = [OAuth2Authentication]
|
|
|
|
|
permission_classes = [TokenHasReadWriteScope]
|
|
|
|
|
queryset = CompanyLogo.objects.all()
|
|
|
|
|
serializer_class = CompanyLogoSerializer
|
|
|
|
|
# required_scope = ['main']
|
|
|
|
|
required_scope = ['main']
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class SkillViewset(viewsets.ModelViewSet):
|
|
|
|
|
authentication_classes = [OAuth2ClientCredentialAuthentication]
|
|
|
|
|
# permission_classes = [TokenHasReadWriteScope]
|
|
|
|
|
authentication_classes = [OAuth2Authentication]
|
|
|
|
|
permission_classes = [TokenHasReadWriteScope]
|
|
|
|
|
queryset = Skill.objects.all()
|
|
|
|
|
serializer_class = SkillSerializer
|
|
|
|
|
# required_scope = ['main']
|
|
|
|
|
required_scope = ['main']
|
|
|
|
|
|