Skip to content

Commit a499738

Browse files
committed
Merge branch 'dev-4.3.1' of https://code.alipay.com/oceanbase/oceanbase-developer-center into dev-4.3.1
2 parents 00c6d48 + 9f62343 commit a499738

File tree

2 files changed

+2
-29
lines changed

2 files changed

+2
-29
lines changed

src/page/Project/Database/index.tsx

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -132,14 +132,6 @@ const Database: React.FC<IProps> = ({ id, modalStore }) => {
132132
);
133133
};
134134

135-
const getAuthString = (authList: DatabasePermissionType[]) => {
136-
if (authList?.length === 0) return '无权限';
137-
return authList
138-
?.map((i) => databasePermissionTypeMap[i]?.text || '')
139-
?.filter(Boolean)
140-
?.join(',');
141-
};
142-
143135
const clearSelectedRowKeys = () => {
144136
setSelectedRowKeys([]);
145137
};
@@ -355,14 +347,6 @@ const Database: React.FC<IProps> = ({ id, modalStore }) => {
355347
ellipsis: true,
356348
render: (collationName) => collationName || '-',
357349
},
358-
{
359-
title: '权限',
360-
dataIndex: 'authorizedPermissionTypes',
361-
width: 130,
362-
render(v) {
363-
return getAuthString(v);
364-
},
365-
},
366350
{
367351
title: formatMessage({
368352
id: 'odc.Project.Database.LastSynchronizationTime',
@@ -396,7 +380,6 @@ const Database: React.FC<IProps> = ({ id, modalStore }) => {
396380
const hasQueryAuth = record.authorizedPermissionTypes?.includes(
397381
DatabasePermissionType.QUERY,
398382
);
399-
const hasNoDBAuth = record.authorizedPermissionTypes?.length === 0;
400383

401384
const curRoles = project?.currentUserResourceRoles || [];
402385
const hasChangeOwnerAuth = curRoles.some((role) =>
@@ -445,18 +428,6 @@ const Database: React.FC<IProps> = ({ id, modalStore }) => {
445428
}
446429
return (
447430
<Action.Group size={3}>
448-
{hasNoDBAuth ? (
449-
<Action.Link
450-
key={'applyDBAuth'}
451-
onClick={() => {
452-
modalStore.changeApplyDatabasePermissionModal(true, {
453-
databaseId: record?.id,
454-
});
455-
}}
456-
>
457-
库权限申请
458-
</Action.Link>
459-
) : null}
460431
{config?.features?.task?.includes(TaskType.EXPORT) && setting.enableDBExport && (
461432
<Action.Link
462433
key={'export'}

src/page/Workspace/SideBar/ResourceTree/DatabaseSearchModal/components/ObjectList.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,8 @@ const ObjectList = ({
151151
<div className={styles.objectlistBox}>
152152
{typeObjectTree?.map((i) => {
153153
const isDatabase = i.key === DbObjectType.database;
154+
/* 在选择了库之后检索, 会检索到数据库本身(若数据库名包含searchkey), 需要前端屏蔽掉 */
155+
if (isDatabase && database) return;
154156
if (i?.data?.length) {
155157
return (
156158
<div className={styles.objectTypeBox}>

0 commit comments

Comments
 (0)