diff --git a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/PermissionManager/DataSourceTable.tsx b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/PermissionManager/DataSourceTable.tsx
index 0e75b03a2..714e25b7a 100644
--- a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/PermissionManager/DataSourceTable.tsx
+++ b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/PermissionManager/DataSourceTable.tsx
@@ -31,7 +31,6 @@ export const useAvailableActions = () => {
export const DataSourceTable = () => {
const record = useRecord();
- console.log(record.key);
return (
diff --git a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/PermissionManager/RoleConfigure.tsx b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/PermissionManager/RoleConfigure.tsx
index d1fcc5d48..e25b4d3a0 100644
--- a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/PermissionManager/RoleConfigure.tsx
+++ b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/PermissionManager/RoleConfigure.tsx
@@ -3,12 +3,12 @@ import React, { useContext } from 'react';
import { useTranslation } from 'react-i18next';
import { useAPIClient, useRequest, SchemaComponent, useRecord } from '@nocobase/client';
import { PermissionContext } from './PermisionProvider';
+import { CurrentRolesContext } from './';
export const RoleConfigure = () => {
- const { update, currentRecord } = useContext(PermissionContext);
+ const { update } = useContext(PermissionContext);
const { t } = useTranslation();
const { key } = useRecord();
-
return (
{
'x-component-props': {
useValues: (options) => {
const api = useAPIClient();
+ const role = useContext(CurrentRolesContext);
return useRequest(
() =>
api
.resource(`dataSources/${key}/roles`)
.get({
- filterByTk: currentRecord.name,
+ filterByTk: role.name,
})
.then((res) => {
const record = res?.data?.data;