Fix setting scim config
This commit is contained in:
parent
23088c036e
commit
5e478f2eaa
|
@ -24,7 +24,9 @@
|
|||
try {
|
||||
await API.saveConfig({
|
||||
type: configType,
|
||||
enabled: scimEnabled,
|
||||
config: {
|
||||
enabled: scimEnabled,
|
||||
},
|
||||
})
|
||||
notifications.success(`Settings saved`)
|
||||
} catch (e) {
|
||||
|
|
|
@ -58,6 +58,13 @@ function oidcValidation() {
|
|||
}).unknown(true)
|
||||
}
|
||||
|
||||
function scimValidation() {
|
||||
// prettier-ignore
|
||||
return Joi.object({
|
||||
enabled: Joi.boolean().required(),
|
||||
}).unknown(true)
|
||||
}
|
||||
|
||||
function buildConfigSaveValidation() {
|
||||
// prettier-ignore
|
||||
return auth.joiValidator.body(Joi.object({
|
||||
|
@ -74,7 +81,8 @@ function buildConfigSaveValidation() {
|
|||
{ is: ConfigType.SETTINGS, then: settingValidation() },
|
||||
{ is: ConfigType.ACCOUNT, then: Joi.object().unknown(true) },
|
||||
{ is: ConfigType.GOOGLE, then: googleValidation() },
|
||||
{ is: ConfigType.OIDC, then: oidcValidation() }
|
||||
{ is: ConfigType.OIDC, then: oidcValidation() },
|
||||
{ is: ConfigType.SCIM, then: scimValidation() }
|
||||
],
|
||||
}),
|
||||
}).required().unknown(true),
|
||||
|
|
Loading…
Reference in New Issue