Merge pull request #3650 from jumpserver/dev_i18n

[Update] 翻译应用树更节点(API)
pull/3651/head
BaiJiangJie 2020-01-16 11:31:55 +08:00 committed by GitHub
commit 23b896b301
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View File

@ -2,6 +2,7 @@
#
from django.db.models import Q
from django.utils.translation import ugettext as _
from orgs.utils import set_to_root_org
from ..models import DatabaseAppPermission
@ -16,7 +17,6 @@ __all__ = [
'parse_database_app_to_tree_node'
]
def get_user_database_app_permissions(user, include_group=True):
if include_group:
groups = user.groups.all()
@ -73,7 +73,7 @@ class DatabaseAppPermissionUtil:
def construct_database_apps_tree_root():
tree_root = {
'id': 'ID_DATABASE_APP_ROOT',
'name': 'DatabaseApp',
'name': _('DatabaseApp'),
'title': 'DatabaseApp',
'pId': '',
'open': False,

View File

@ -2,6 +2,7 @@
#
from django.db.models import Q
from django.utils.translation import ugettext as _
from common.tree import TreeNode
from orgs.utils import set_to_root_org
@ -72,7 +73,7 @@ class RemoteAppPermissionUtil:
def construct_remote_apps_tree_root():
tree_root = {
'id': 'ID_REMOTE_APP_ROOT',
'name': 'RemoteApp',
'name': _('RemoteApp'),
'title': 'RemoteApp',
'pId': '',
'open': False,