mirror of https://github.com/jumpserver/jumpserver
perf: 去掉 debug msg
parent
06052b85a2
commit
eb9ac213d5
|
@ -28,7 +28,6 @@ class ChangeSecretMixin(models.Model):
|
||||||
default=SSHKeyStrategy.add, verbose_name=_('SSH key change strategy')
|
default=SSHKeyStrategy.add, verbose_name=_('SSH key change strategy')
|
||||||
)
|
)
|
||||||
|
|
||||||
accounts: list[str] # account usernames
|
|
||||||
get_all_assets: callable # get all assets
|
get_all_assets: callable # get all assets
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
|
|
|
@ -3,6 +3,7 @@ from rest_framework.decorators import action
|
||||||
from rest_framework.response import Response
|
from rest_framework.response import Response
|
||||||
|
|
||||||
from common.api import JMSGenericViewSet
|
from common.api import JMSGenericViewSet
|
||||||
|
from common.permissions import IsValidUser
|
||||||
from assets.serializers import CategorySerializer, TypeSerializer
|
from assets.serializers import CategorySerializer, TypeSerializer
|
||||||
from assets.const import AllTypes
|
from assets.const import AllTypes
|
||||||
|
|
||||||
|
@ -14,7 +15,7 @@ class CategoryViewSet(ListModelMixin, JMSGenericViewSet):
|
||||||
'default': CategorySerializer,
|
'default': CategorySerializer,
|
||||||
'types': TypeSerializer
|
'types': TypeSerializer
|
||||||
}
|
}
|
||||||
permission_classes = ()
|
permission_classes = (IsValidUser,)
|
||||||
|
|
||||||
def get_queryset(self):
|
def get_queryset(self):
|
||||||
return AllTypes.categories()
|
return AllTypes.categories()
|
||||||
|
|
|
@ -40,7 +40,6 @@ def get_platform_automation_methods(path):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
with open(path, 'r') as f:
|
with open(path, 'r') as f:
|
||||||
print("path: ", path)
|
|
||||||
manifest = yaml_load_with_i18n(f)
|
manifest = yaml_load_with_i18n(f)
|
||||||
check_platform_method(manifest, path)
|
check_platform_method(manifest, path)
|
||||||
manifest['dir'] = os.path.dirname(path)
|
manifest['dir'] = os.path.dirname(path)
|
||||||
|
|
|
@ -123,7 +123,7 @@ class AssetPermissionSerializer(BulkOrgResourceModelSerializer):
|
||||||
for i in range(0, len(account_ids), slice_count):
|
for i in range(0, len(account_ids), slice_count):
|
||||||
push_accounts_to_assets_task.delay(account_ids[i:i + slice_count])
|
push_accounts_to_assets_task.delay(account_ids[i:i + slice_count])
|
||||||
|
|
||||||
def validate_accounts(self, usernames: list[str]):
|
def validate_accounts(self, usernames):
|
||||||
template_ids = []
|
template_ids = []
|
||||||
account_usernames = []
|
account_usernames = []
|
||||||
for username in usernames:
|
for username in usernames:
|
||||||
|
|
Loading…
Reference in New Issue