Skip to content

Commit

Permalink
Fixed SHIBUI-1941
Browse files Browse the repository at this point in the history
  • Loading branch information
rmathis committed Jun 11, 2021
1 parent 37a7299 commit 86b1f78
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 20 deletions.
19 changes: 0 additions & 19 deletions ui/public/assets/schema/source/metadata-source.json
Original file line number Diff line number Diff line change
Expand Up @@ -142,25 +142,6 @@
"nameIdFormats": {
"$ref": "#/definitions/nameIdFormats"
}
},
"dependencies": {
"nameIdFormats": {
"oneOf": [
{
"nameIdFormats": {
"minLength": 1
},
"required": [
"protocolSupportEnum"
]
},
{
"nameIdFormats": {
"minLength": 0
}
}
]
}
}
},
"logoutEndpoints": {
Expand Down
6 changes: 5 additions & 1 deletion ui/src/app/metadata/domain/source/SourceDefinition.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ export const SourceBase = {
type: '@MetadataProvider',
steps: [],
schema: `${API_BASE_PATH}/ui/MetadataSources`,
validatorParams: [/*getAllOtherIds*/],

parser: (data) => removeNull(data, true),

Expand All @@ -28,6 +27,11 @@ export const SourceBase = {
if (entityIds.indexOf(formData.entityId) > -1) {
errors.entityId.addError('message.id-unique');
}

if (formData?.serviceProviderSsoDescriptor?.nameIdFormats?.length > 0 && !formData.serviceProviderSsoDescriptor.protocolSupportEnum) {
errors.serviceProviderSsoDescriptor.protocolSupportEnum.addError('message.protocol-support-required')
}

return errors;
}
},
Expand Down

0 comments on commit 86b1f78

Please sign in to comment.