diff --git a/apps/assets/const/base.py b/apps/assets/const/base.py index 6eb0cd1a1..3236050ea 100644 --- a/apps/assets/const/base.py +++ b/apps/assets/const/base.py @@ -110,22 +110,10 @@ class BaseType(TextChoices): def get_community_types(cls): return cls._get_choices_to_types() - @classmethod - def get_lite_types(cls): - return [] - @classmethod def get_choices(cls): if not settings.XPACK_ENABLED: choices = [(tp.value, tp.label) for tp in cls.get_community_types()] else: choices = cls.choices - - if not settings.LITE: - return choices - - lite_choices = cls.get_lite_types() - if lite_choices: - lite_choices = [c.value for c in lite_choices] - choices = [c for c in choices if c[0] in lite_choices] return choices diff --git a/apps/assets/const/database.py b/apps/assets/const/database.py index 4fba6aeb6..261373688 100644 --- a/apps/assets/const/database.py +++ b/apps/assets/const/database.py @@ -107,10 +107,3 @@ class DatabaseTypes(BaseType): return [ cls.MYSQL, cls.MARIADB, cls.MONGODB, cls.REDIS ] - - @classmethod - def get_lite_types(cls): - return [ - cls.MYSQL, cls.MARIADB, cls.POSTGRESQL, cls.ORACLE, - cls.SQLSERVER, cls.DB2 - ] diff --git a/apps/assets/const/types.py b/apps/assets/const/types.py index 81c5f190f..e980501c4 100644 --- a/apps/assets/const/types.py +++ b/apps/assets/const/types.py @@ -169,11 +169,11 @@ class AllTypes(ChoicesMixin): (Category.HOST, HostTypes), (Category.DEVICE, DeviceTypes), (Category.DATABASE, DatabaseTypes), + (Category.WEB, WebTypes), ] - if not settings.LITE: + if settings.XPACK_ENABLED: types.extend([ (Category.CLOUD, CloudTypes), - (Category.WEB, WebTypes), (Category.GPT, GPTTypes), (Category.CUSTOM, CustomTypes), ]) diff --git a/apps/i18n/core/en/LC_MESSAGES/django.po b/apps/i18n/core/en/LC_MESSAGES/django.po index ff232e41a..4a6759ef4 100644 --- a/apps/i18n/core/en/LC_MESSAGES/django.po +++ b/apps/i18n/core/en/LC_MESSAGES/django.po @@ -7761,7 +7761,7 @@ msgid "Org roles" msgstr "" #: users/serializers/user.py:90 -msgid "Password option" +msgid "Password setting" msgstr "" #: users/serializers/user.py:92 diff --git a/apps/i18n/core/ja/LC_MESSAGES/django.po b/apps/i18n/core/ja/LC_MESSAGES/django.po index 98c3e1060..ca74a31e1 100644 --- a/apps/i18n/core/ja/LC_MESSAGES/django.po +++ b/apps/i18n/core/ja/LC_MESSAGES/django.po @@ -8070,7 +8070,7 @@ msgstr "組織ロール" #: users/serializers/user.py:90 #, fuzzy #| msgid "Password prompt" -msgid "Password option" +msgid "Password setting" msgstr "パスワードプロンプト" #: users/serializers/user.py:92 diff --git a/apps/i18n/core/zh/LC_MESSAGES/django.po b/apps/i18n/core/zh/LC_MESSAGES/django.po index f5c201479..f5860e701 100644 --- a/apps/i18n/core/zh/LC_MESSAGES/django.po +++ b/apps/i18n/core/zh/LC_MESSAGES/django.po @@ -7883,7 +7883,7 @@ msgid "Org roles" msgstr "组织角色" #: users/serializers/user.py:90 -msgid "Password option" +msgid "Password setting" msgstr "密码选项" #: users/serializers/user.py:92 diff --git a/apps/i18n/lina/en.json b/apps/i18n/lina/en.json index ddfe51999..273cb4036 100644 --- a/apps/i18n/lina/en.json +++ b/apps/i18n/lina/en.json @@ -47,9 +47,10 @@ "ActiveUsers": "Active Users", "Activity": "Activities", "Add": "Add", + "AddAll": "Add all", "AddAccount": "Add account", "AddAccountResult": "Second-Level Approver", - "AddAllMembersWarningMsg": "Are you sure you want to add all members?", + "AddAllMembersWarningMsg": "Are you sure add all user to this group ?", "AddAsset": "Add Assets", "AddAssetToNode": "Add Assets to Node", "AddAssetToThisPermission": "Add Assets", @@ -391,9 +392,9 @@ "Download": "Download", "DownloadCenter": "Download Center", "DownloadFTPFileTip": "The current action does not record files, or the file size exceeds the threshold (default 100M), or it has not yet been saved to the corresponding storage", - "DownloadImportTemplateMsg": "Download Creation Template", + "DownloadImportTemplateMsg": "Download creation template", "DownloadReplay": "Download Recording", - "DownloadUpdateTemplateMsg": "Download Update Template", + "DownloadUpdateTemplateMsg": "Download update template", "DragUploadFileInfo": "Drag files here, or click here to upload", "DuplicateFileExists": "Uploading a file with the same name is not allowed, please delete the file with the same name", "Duration": "Duration", @@ -440,7 +441,7 @@ "Expire": "Expired", "Expired": "Expiration Date", "Export": "Export", - "ExportAll": "Export All", + "ExportAll": "Export all", "ExportOnlyFiltered": "Export filtered items", "ExportOnlySelectedItems": "Export selected items", "ExportRange": "Export Range", @@ -953,7 +954,7 @@ "Security": "Security", "Select": "Select", "SelectAdhoc": "Select Command", - "SelectAll": "Select All", + "SelectAll": "Select all", "SelectAtLeastOneAssetOrNodeErrMsg": "Select at Least One Asset or Node", "SelectAttrs": "Select Attributes", "SelectByAttr": "Attribute Filter", @@ -1039,7 +1040,7 @@ "StrategyHelpTips": "Identify the unique attributes of assets (such as platforms) based on priority of strategies; when an asset's attribute (like nodes) can be configured to multiple, all Actions of the strategies will be executed.", "StrategyList": "Policy List", "StrategyUpdate": "Update the Policy", - "SuEnabled": "Enable su", + "SuEnabled": "Enable switch", "SuFrom": "Switch From", "Submit": "Submit", "Success": "Success", @@ -1099,8 +1100,8 @@ "TerminateTaskSendSuccessMsg": "Task termination has been issued, please refresh and check later", "TermsAndConditions": "Terms and Conditions", "Test": "Test", - "TestAccountConnective": "Test Account Connectivity", - "TestAssetsConnective": "Test Asset Connectivity", + "TestAccountConnective": "Test Connectivity", + "TestAssetsConnective": "Test Connectivity", "TestConnection": "Test Connection", "TestGatewayHelpMessage": "If NAT port mapping is used, please set it to the real port listened to by SSH", "TestGatewayTestConnection": "Test Connect to Gateway", diff --git a/apps/terminal/migrations/0061_applet_can_concurrent.py b/apps/terminal/migrations/0061_applet_can_concurrent.py index 5041e5425..b770b7864 100644 --- a/apps/terminal/migrations/0061_applet_can_concurrent.py +++ b/apps/terminal/migrations/0061_applet_can_concurrent.py @@ -13,6 +13,6 @@ class Migration(migrations.Migration): migrations.AddField( model_name='applet', name='can_concurrent', - field=models.BooleanField(default=False, verbose_name='Can concurrent'), + field=models.BooleanField(default=False, verbose_name='Concurrent'), ), ] diff --git a/apps/users/api/group.py b/apps/users/api/group.py index 1e34a7caa..44385d090 100644 --- a/apps/users/api/group.py +++ b/apps/users/api/group.py @@ -1,11 +1,8 @@ # -*- coding: utf-8 -*- # -from rest_framework import status -from rest_framework.decorators import action -from rest_framework.response import Response from orgs.mixins.api import OrgBulkModelViewSet -from ..models import UserGroup, User +from ..models import UserGroup from ..serializers import UserGroupSerializer, UserGroupListSerializer __all__ = ['UserGroupViewSet'] @@ -20,13 +17,3 @@ class UserGroupViewSet(OrgBulkModelViewSet): 'list': UserGroupListSerializer, } ordering = ('name',) - rbac_perms = ( - ("add_all_users", "users.add_usergroup"), - ) - - @action(methods=['post'], detail=True, url_path='add-all-users') - def add_all_users(self, request, *args, **kwargs): - instance = self.get_object() - users = User.get_org_users().exclude(groups__id=instance.id) - instance.users.add(*users) - return Response(status=status.HTTP_200_OK) diff --git a/apps/users/serializers/user.py b/apps/users/serializers/user.py index b5b42a5e5..626c54d48 100644 --- a/apps/users/serializers/user.py +++ b/apps/users/serializers/user.py @@ -87,7 +87,7 @@ class UserSerializer(RolesSerializerMixin, ResourceLabelsMixin, CommonBulkModelS default=PasswordStrategy.email, allow_null=True, required=False, - label=_("Password option"), + label=_("Password setting"), ) mfa_enabled = serializers.BooleanField(read_only=True, label=_("MFA enabled")) mfa_force_enabled = serializers.BooleanField(