diff --git a/apps/common/api/action.py b/apps/common/api/action.py index 9959adcaf..b1378df66 100644 --- a/apps/common/api/action.py +++ b/apps/common/api/action.py @@ -8,6 +8,7 @@ from rest_framework.request import Request from rest_framework.response import Response from common.const.http import POST, PUT +from orgs.models import Organization from orgs.utils import current_org __all__ = ['SuggestionMixin', 'RenderToJsonMixin'] @@ -25,7 +26,12 @@ class SuggestionMixin: @action(methods=['get'], detail=False, url_path='suggestions') def match(self, request, *args, **kwargs): queryset = self.get_queryset() - if not request.user.orgs.filter(id=current_org.id).exists(): + org_id = str(current_org.id) + if ( + not request.user.is_superuser and + org_id != Organization.ROOT_ID and + not request.user.orgs.filter(id=org_id).exists() + ): queryset = queryset.none() queryset = self.filter_queryset(queryset) diff --git a/apps/i18n/lina/ja.json b/apps/i18n/lina/ja.json index 76b03a12b..b1327eec8 100644 --- a/apps/i18n/lina/ja.json +++ b/apps/i18n/lina/ja.json @@ -646,7 +646,7 @@ "HistoryDate": "日付", "HistoryPassword": "過去のパスワード", "HistoryRecord": "履歴記録", - "Host": "資産", + "Host": "ホスト", "HostCreate": "資産-ホストの作成", "HostDeployment": "リリースマシンのデプロイ", "HostUpdate": "資産-ホストの更新", diff --git a/apps/i18n/lina/ko.json b/apps/i18n/lina/ko.json index 14d34de40..c743bb393 100644 --- a/apps/i18n/lina/ko.json +++ b/apps/i18n/lina/ko.json @@ -641,7 +641,7 @@ "HistoryDate": "날짜", "HistoryPassword": "역사 비밀번호", "HistoryRecord": "역사 기록", - "Host": "자산", + "Host": "호스트", "HostCreate": "자산 생성 - 호스트", "HostDeployment": "배포 장비 배포", "HostUpdate": "자산 업데이트 - 호스트", diff --git a/apps/i18n/lina/pt_br.json b/apps/i18n/lina/pt_br.json index 56c168563..99a2d98d8 100644 --- a/apps/i18n/lina/pt_br.json +++ b/apps/i18n/lina/pt_br.json @@ -642,7 +642,7 @@ "HistoryDate": " Data", "HistoryPassword": "Senhas anteriores", "HistoryRecord": "Histórico", - "Host": "Ativos", + "Host": "Host", "HostCreate": "Criar Ativo - Host", "HostDeployment": "Deploy da máquina de produção", "HostUpdate": "Atualização de ativos - host", diff --git a/apps/i18n/lina/ru.json b/apps/i18n/lina/ru.json index 710f49c65..cf9e0a014 100644 --- a/apps/i18n/lina/ru.json +++ b/apps/i18n/lina/ru.json @@ -643,7 +643,7 @@ "HistoryDate": "Дата", "HistoryPassword": "История паролей", "HistoryRecord": "История записей", - "Host": "Хост", + "Host": "Хост.", "HostCreate": "Создать актив - хост", "HostDeployment": "Развертывание машины публикации", "HostUpdate": "Обновить актив - хост", diff --git a/apps/i18n/lina/zh.json b/apps/i18n/lina/zh.json index 0010a2b56..a853397f2 100644 --- a/apps/i18n/lina/zh.json +++ b/apps/i18n/lina/zh.json @@ -641,7 +641,7 @@ "HistoryDate": "日期", "HistoryPassword": "历史密码", "HistoryRecord": "历史记录", - "Host": "资产", + "Host": "主机", "HostCreate": "创建资产-主机", "HostDeployment": "发布机部署", "HostUpdate": "更新资产-主机", diff --git a/apps/i18n/lina/zh_hant.json b/apps/i18n/lina/zh_hant.json index 4adffc3a2..5fc52a4fd 100644 --- a/apps/i18n/lina/zh_hant.json +++ b/apps/i18n/lina/zh_hant.json @@ -646,7 +646,7 @@ "HistoryDate": "日期", "HistoryPassword": "歷史密碼", "HistoryRecord": "歷史紀錄", - "Host": "資產", + "Host": "主機", "HostCreate": "創建資產-主機", "HostDeployment": "發布機部署", "HostUpdate": "更新資產-主機",