def get_serializer_class(self):
    if permissions.IsUsersManager().has_permission(self.request, self):
        if settings.EMAIL_ENABLED:
            return serializers.UserForManagerSerializer
        return serializers.UserForManagerWithPasswordSerializer
    return serializers.UserSerializer
def get_serializer_class(self):
    if permissions.IsUsersManager().has_permission(self.request, self):
        if settings.EMAIL_ENABLED:
            return serializers.UserForManagerSerializer
        return serializers.UserForManagerWithPasswordSerializer
    return serializers.UserSerializer