perf: 去掉 debug

pull/10829/head
ibuler 2023-06-27 14:31:20 +08:00
parent 77bcb05d80
commit a22f36a06a
7 changed files with 9 additions and 9 deletions

View File

@ -13,7 +13,7 @@ class AliasAccount(TextChoices):
ALL = '@ALL', _('All')
INPUT = '@INPUT', _('Manual input')
USER = '@USER', _('Dynamic user')
ANON = '@ANON', _('Anonymous user')
ANON = '@ANON', _('Anonymous account')
class Source(TextChoices):

View File

@ -9,6 +9,7 @@ from django.utils import timezone
from django.utils.translation import ugettext_lazy as _
from rest_framework.exceptions import PermissionDenied
from accounts.const import AliasAccount
from assets.const import Protocol
from assets.const.host import GATEWAY_NAME
from common.db.fields import EncryptTextField
@ -209,7 +210,7 @@ class ConnectionToken(JMSOrgBaseModel):
if not self.asset:
return None
if self.account == '@ANON' and self.asset.category not in ['web', 'custom']:
if self.account == AliasAccount.ANON and self.asset.category not in ['web', 'custom']:
raise JMSException({'error': 'Anonymous account is not supported in {}'.format(self.asset.category)})
if self.account.startswith('@'):

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:36918c53144eaae27cb3b68d47882f6ca9b75669862f28f611fb737f6ca39631
size 145810
oid sha256:2e28e9c4ff5d91a24d0c176a134f913de93f4a9bd3e9c8fd7aeacaf875a242d5
size 145813

View File

@ -63,7 +63,7 @@ msgid "Dynamic user"
msgstr "動的コード"
#: accounts/const/account.py:16
msgid "Anonymous user"
msgid "Anonymous account"
msgstr "匿名ユーザー"
#: accounts/const/account.py:20 users/models/user.py:699

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:1f4301cf32731559d2e5ce41c2ab00e4655931914d8ce36bde4ad831cc5ee3f9
size 119305
oid sha256:092b15ed84725ceb974bd46407e3d247e6ff9d0505b6044f18c122bf6da1b7f6
size 119308

View File

@ -62,7 +62,7 @@ msgid "Dynamic user"
msgstr "同名账号"
#: accounts/const/account.py:16
msgid "Anonymous user"
msgid "Anonymous account"
msgstr "匿名用户"
#: accounts/const/account.py:20 users/models/user.py:699

View File

@ -81,5 +81,4 @@ class PermAccountUtil(AssetPermissionUtil):
account.actions = action_bit
account.date_expired = max(cleaned_accounts_expired[account])
accounts.append(account)
print("Accounts: ", accounts)
return accounts