add scope to user views and cleanup

This commit is contained in:
Sayyid Hamid Mahdavi 2020-10-10 09:49:02 +03:30
parent d89e17a6f2
commit 496dbc481d

View file

@ -60,7 +60,7 @@ class RequestOTPView(generics.CreateAPIView):
class ChangePasswordView(generics.UpdateAPIView):
permission_classes = [permissions.IsAuthenticated, IsAuthenticatedOrTokenHasScope]
serializer_class = ChangePasswordSerializer
required_scopes = []
required_scopes = ["accounts.account:change_password"]
model = User
def get_object(self, queryset=None):