diff --git a/ui/src/pages/Admin/Seo/index.tsx b/ui/src/pages/Admin/Seo/index.tsx index 6c979dc0..a682fbaf 100644 --- a/ui/src/pages/Admin/Seo/index.tsx +++ b/ui/src/pages/Admin/Seo/index.tsx @@ -80,7 +80,7 @@ const Index: FC = () => { formMeta.robots.value = setting.robots; formMeta.permalink.value = setting.permalink; if (!/[1234]/.test(formMeta.permalink.value)) { - formMeta.permalink.value = 1; + formMeta.permalink.value = 4; } setFormData(formMeta); } diff --git a/ui/src/pages/Admin/Users/index.tsx b/ui/src/pages/Admin/Users/index.tsx index bf6a2c8d..1c1b8fc1 100644 --- a/ui/src/pages/Admin/Users/index.tsx +++ b/ui/src/pages/Admin/Users/index.tsx @@ -57,8 +57,10 @@ const Users: FC = () => { const currentUser = loggedUserInfoStore((state) => state.user); const { agent: ucAgent } = userCenterStore(); const [adminUcAgent, setAdminUcAgent] = useState({ - user_status_agent_enabled: false, - user_password_agent_enabled: false, + allow_create_user: true, + allow_update_user_status: true, + allow_update_user_password: true, + allow_update_user_role: true, }); const Toast = useToast(); const { @@ -156,6 +158,18 @@ const Users: FC = () => { }); } }, [ucAgent]); + const showAddUser = + !ucAgent?.enabled || (ucAgent?.enabled && adminUcAgent?.allow_create_user); + const showActionPassword = + !ucAgent?.enabled || + (ucAgent?.enabled && adminUcAgent?.allow_update_user_password); + const showActionRole = + !ucAgent?.enabled || + (ucAgent?.enabled && adminUcAgent?.allow_update_user_role); + const showActionStatus = + !ucAgent?.enabled || + (ucAgent?.enabled && adminUcAgent?.allow_update_user_status); + const showAction = showActionPassword || showActionRole || showActionStatus; return ( <>

{t('title')}

@@ -167,7 +181,7 @@ const Users: FC = () => { sortKey="filter" i18nKeyPrefix="admin.users" /> - {!ucAgent?.enabled ? ( + {showAddUser ? (