diff --git a/frontend/src/features/rbac/components/BatchImportModal.tsx b/frontend/src/features/rbac/components/BatchImportModal.tsx index 6a15987..20a9ba6 100644 --- a/frontend/src/features/rbac/components/BatchImportModal.tsx +++ b/frontend/src/features/rbac/components/BatchImportModal.tsx @@ -212,14 +212,9 @@ export function BatchImportModal({ onClose, onImported }: BatchImportModalProps) }; // LDAP 未配置时隐藏 LDAP 相关 Tab(本地 CSV 始终可用) + // LDAP 仅作只读接入:不再提供「导入到 LDAP」「从 LDAP 导入」 const TABS = [ { key: 'local' as const, label: '本地导入', icon: Upload }, - ...(ldapEnabled - ? [ - { key: 'to-ldap' as const, label: '导入到 LDAP', icon: Server }, - { key: 'from-ldap' as const, label: '从 LDAP 导入', icon: UsersIcon }, - ] - : []), ]; return ( diff --git a/frontend/src/features/system/ldap/components/LdapConfigForm.tsx b/frontend/src/features/system/ldap/components/LdapConfigForm.tsx index 04a2bdd..dd19d29 100644 --- a/frontend/src/features/system/ldap/components/LdapConfigForm.tsx +++ b/frontend/src/features/system/ldap/components/LdapConfigForm.tsx @@ -16,7 +16,6 @@ interface LdapConfigFormProps { onConfigChange: Dispatch>; onTestServer: () => void; onSave: () => void; - onOpenAccountTest: () => void; } export function LdapConfigForm({ @@ -28,7 +27,6 @@ export function LdapConfigForm({ onConfigChange, onTestServer, onSave, - onOpenAccountTest, }: LdapConfigFormProps) { /* ── helpers ── */ const updateField = (key: K, value: LdapConfigData[K]) => { @@ -183,14 +181,6 @@ export function LdapConfigForm({ {testResult.msg} )} - {config.ldap_host && config.base_dn && ( - - )} ); diff --git a/frontend/src/pages/LdapConfigPage.tsx b/frontend/src/pages/LdapConfigPage.tsx index b5b1953..e80aa52 100644 --- a/frontend/src/pages/LdapConfigPage.tsx +++ b/frontend/src/pages/LdapConfigPage.tsx @@ -337,16 +337,13 @@ export default function LdapConfigPage() { onConfigChange={setConfig} onTestServer={handleTestServer} onSave={handleSave} - onOpenAccountTest={() => setShowAccountTest(true)} /> - {/* ── LDAP 账号管理(未保存配置前隐藏,保存后出现) ── */} - {!loading && !configured && ( -
- LDAP 未启用:保存基础连接配置后,这里会出现 LDAP 账号管理与用户导入入口 -
- )} - {configured && ( + {/* ── LDAP 账号管理已移除 ── + 本系统 LDAP 仅作「只读接入」:仅用于域账号登录认证, + 不再提供新建 OU / 添加用户 / 删除用户 / 批量导入到 LDAP 等写操作。 + 如需维护 LDAP 目录,请在域控侧操作。 */} + {false && (