Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/lang/en/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
"ldap_manager_dn": "Ldap manager dn",
"ldap_manager_password": "Ldap manager password",
"ldap_server": "Ldap server",
"ldap_skip_tls_verify": "Insecure skip TLS verify",
"ldap_user_search_base": "Ldap user search base",
"ldap_user_search_filter": "Ldap user search filter",
"link_expiration": "Link expiration",
Expand Down
1 change: 1 addition & 0 deletions src/lang/en/users.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"role": "Role",
"permission": "Permission",
"disabled": "Disabled",
"allow_ldap": "Allow LDAP login",
"available": "Available",
"update_profile": "Update Profile",
"update_profile_success": "Profile updated successfully, please log in again.",
Expand Down
15 changes: 15 additions & 0 deletions src/pages/manage/users/AddOrEdit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ const AddOrEdit = () => {
permission: 0,
disabled: false,
sso_id: "",
allow_ldap: false,
})
const [userLoading, loadUser] = useFetch(
(): PResp<User> => r.get(`/admin/user/get?id=${id}`),
Expand Down Expand Up @@ -145,6 +146,20 @@ const AddOrEdit = () => {
{t(`users.disabled`)}
</Checkbox>
</FormControl>
<FormControl w="fit-content" display="flex">
<Checkbox
css={{ whiteSpace: "nowrap" }}
id="allow_ldap"
onChange={(e: any) =>
setUser("allow_ldap", e.currentTarget.checked)
}
color="$neutral10"
fontSize="$sm"
checked={user.allow_ldap}
>
{t(`users.allow_ldap`)}
</Checkbox>
</FormControl>
<Button
loading={okLoading()}
onClick={async () => {
Expand Down
1 change: 1 addition & 0 deletions src/types/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export interface User {
permission: number
sso_id: string
disabled: boolean
allow_ldap: boolean
// otp: boolean;
}

Expand Down