|
|
|
@ -1,10 +1,10 @@
|
|
|
|
|
from rest_framework.response import Response
|
|
|
|
|
from rest_framework.generics import CreateAPIView
|
|
|
|
|
from rest_framework.response import Response
|
|
|
|
|
|
|
|
|
|
from common.utils import reverse, lazyproperty
|
|
|
|
|
from orgs.utils import tmp_to_org
|
|
|
|
|
from ..models import LoginAssetACL
|
|
|
|
|
from .. import serializers
|
|
|
|
|
from ..models import LoginAssetACL
|
|
|
|
|
|
|
|
|
|
__all__ = ['LoginAssetCheckAPI']
|
|
|
|
|
|
|
|
|
@ -32,7 +32,7 @@ class LoginAssetCheckAPI(CreateAPIView):
|
|
|
|
|
def check_confirm(self):
|
|
|
|
|
with tmp_to_org(self.serializer.asset.org):
|
|
|
|
|
acl = LoginAssetACL.objects \
|
|
|
|
|
.filter(action=LoginAssetACL.ActionChoices.login_confirm)\
|
|
|
|
|
.filter(action=LoginAssetACL.ActionChoices.confirm) \
|
|
|
|
|
.filter_user(self.serializer.user) \
|
|
|
|
|
.filter_asset(self.serializer.asset) \
|
|
|
|
|
.filter_account(self.serializer.validated_data.get('account_username')) \
|
|
|
|
|