|
|
@ -13,6 +13,7 @@ __all__ = [
|
|
|
|
]
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
|
|
from orgs.utils import tmp_to_root_org
|
|
|
|
from orgs.utils import tmp_to_root_org
|
|
|
|
|
|
|
|
from orgs.utils import tmp_to_org
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class ActionChoices(models.TextChoices):
|
|
|
|
class ActionChoices(models.TextChoices):
|
|
|
@ -116,7 +117,8 @@ class UserAssetAccountBaseACL(OrgModelMixin, UserBaseACL):
|
|
|
|
queryset = queryset.filter(q)
|
|
|
|
queryset = queryset.filter(q)
|
|
|
|
if asset:
|
|
|
|
if asset:
|
|
|
|
org_id = asset.org_id
|
|
|
|
org_id = asset.org_id
|
|
|
|
q = cls.assets.get_filter_q(asset)
|
|
|
|
with tmp_to_org(org_id):
|
|
|
|
|
|
|
|
q = cls.assets.get_filter_q(asset)
|
|
|
|
queryset = queryset.filter(q)
|
|
|
|
queryset = queryset.filter(q)
|
|
|
|
if account and not account_username:
|
|
|
|
if account and not account_username:
|
|
|
|
account_username = account.username
|
|
|
|
account_username = account.username
|
|
|
|