Update ldap group mapping schema, replace group input field with select

This commit is contained in:
Tuan Dang
2024-04-23 15:04:02 -07:00
parent 961c6391a8
commit d222bbf131
12 changed files with 123 additions and 42 deletions
+14 -1
View File
@@ -71,6 +71,7 @@ export const registerLdapRouter = async (server: FastifyZodProvider) => {
// If group search values are not provided, proceed directly to LDAP login
return await server.services.ldap
.ldapLogin({
ldapConfigId: ldapConfig.id,
externalId: user.uidNumber,
username: user.uid,
firstName: user.givenName,
@@ -111,6 +112,7 @@ export const registerLdapRouter = async (server: FastifyZodProvider) => {
// groups here
ldapClient.unbind();
return server.services.ldap.ldapLogin({
ldapConfigId: ldapConfig.id,
externalId: user.uidNumber,
username: user.uid,
firstName: user.givenName,
@@ -292,7 +294,18 @@ export const registerLdapRouter = async (server: FastifyZodProvider) => {
configId: z.string().trim()
}),
response: {
200: z.array(LdapGroupMapsSchema)
200: z.array(
z.object({
id: z.string(),
ldapConfigId: z.string(),
ldapGroupCN: z.string(),
group: z.object({
id: z.string(),
name: z.string(),
slug: z.string()
})
})
)
}
},
handler: async (req) => {