This commit is contained in:
Philippe Luickx 2015-04-30 13:24:26 +03:00
commit d0cd73ee2b
2 changed files with 6 additions and 0 deletions

View File

@ -82,6 +82,7 @@ class Register(APIView, SignupView):
class VerifyEmail(APIView, ConfirmEmailView):
permission_classes = (AllowAny,)
authentication_classes = (EverybodyCanAuthentication,)
allowed_methods = ('POST', 'OPTIONS', 'HEAD')
def get(self, *args, **kwargs):

View File

@ -86,6 +86,7 @@ class Logout(APIView):
Accepts/Returns nothing.
"""
permission_classes = (AllowAny,)
authentication_classes = (EverybodyCanAuthentication,)
def post(self, request):
try:
@ -114,6 +115,7 @@ class UserDetails(RetrieveUpdateAPIView):
"""
serializer_class = UserDetailsSerializer
permission_classes = (IsAuthenticated,)
authentication_classes = (EverybodyCanAuthentication,)
def get_object(self):
return self.request.user
@ -130,6 +132,7 @@ class PasswordReset(GenericAPIView):
serializer_class = PasswordResetSerializer
permission_classes = (AllowAny,)
authentication_classes = (EverybodyCanAuthentication,)
def post(self, request, *args, **kwargs):
# Create a serializer with request.DATA
@ -159,6 +162,7 @@ class PasswordResetConfirm(GenericAPIView):
serializer_class = PasswordResetConfirmSerializer
permission_classes = (AllowAny,)
authentication_classes = (EverybodyCanAuthentication,)
def post(self, request):
serializer = self.get_serializer(data=request.DATA)
@ -184,6 +188,7 @@ class PasswordChange(GenericAPIView):
serializer_class = PasswordChangeSerializer
permission_classes = (IsAuthenticated,)
authentication_classes = (EverybodyCanAuthentication,)
def post(self, request):
serializer = self.get_serializer(data=request.DATA)