Skip to content

Commit

Permalink
refactor(other): merge v1.3.0 to v1.4.0 #3564
Browse files Browse the repository at this point in the history
  • Loading branch information
iSecloud committed Mar 15, 2024
1 parent 0a569a7 commit 2170937
Show file tree
Hide file tree
Showing 16 changed files with 68 additions and 1,536 deletions.
6 changes: 4 additions & 2 deletions dbm-ui/backend/db_services/mysql/open_area/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
from backend.components import DBPrivManagerApi
from backend.db_meta.enums import ClusterType
from backend.db_meta.models import Cluster
from backend.db_services.dbpermission.constants import AccountType
from backend.db_services.mysql.open_area.models import TendbOpenAreaConfig
from backend.db_services.mysql.permission.constants import AccountType
from backend.db_services.mysql.remote_service.handlers import RemoteServiceHandler


Expand Down Expand Up @@ -122,7 +122,9 @@ def __get_openarea_rules_set(cls, config, config_data, operator, cluster_id__clu
if not priv_ids:
return []

account_type = AccountType.TENDB if config.cluster_type == ClusterType.TenDBCluster else AccountType.MYSQL
account_type = (
AccountType.TENDBCLUSTER if config.cluster_type == ClusterType.TenDBCluster else AccountType.MYSQL
)
authorize_rules = DBPrivManagerApi.list_account_rules(
{"bk_biz_id": config.bk_biz_id, "ids": priv_ids, "cluster_type": account_type}
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ class MySQLAccountHandler(AccountHandler):
"""
封装账号相关的处理操作
"""

def has_high_risk_privileges(self, rule_sets):
"""
- 判断是否有高危权限
Expand Down
1 change: 1 addition & 0 deletions dbm-ui/backend/flow/utils/mysql/mysql_db_meta.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

from django.db.transaction import atomic

from backend.components import DBPrivManagerApi
from backend.components.mysql_partition.client import DBPartitionApi
from backend.configuration.constants import DBType
from backend.db_meta import api
Expand Down
Loading

0 comments on commit 2170937

Please sign in to comment.