Open hjanott opened 2 days ago
Example attribute mapping.
{
"email": "email",
"title": "title",
"gender": "gender",
"pronoun": "pronoun",
"saml_id": "username",
"is_active": "is_active",
"last_name": "lastName",
"first_name": "firstName",
"member_number": "member_number",
"meeting_mappers": [
{
"name": "works",
"mappings": {
"groups": [
{
"default": "not_a_group",
"attribute": "idp_group_attribute"
},
{
"default": "not_a_group",
"attribute": "group_2"
}
],
"number": {
"attribute": "participant_number"
},
"comment": {
"default": "Vote weight, groups and structure levels set via SSO.",
"attribute": "idp_commentary"
},
"present": {
"default": "True",
"attribute": "presence"
},
"vote_weight": {
"default": "1.000000",
"attribute": "vw"
},
"structure_levels": [
{
"default": "structure1",
"attribute": "structure"
}
]
},
"conditions": [
{
"attribute": "member_number",
"condition": "LV_.*"
},
{
"attribute": "email",
"condition": "[\\w\\.]+@([\\w-]+\\.)+[\\w]{2,4}"
}
],
"external_id": "Landtag"
},
{
"name": "meetingHH-Test",
"mappings": {
"groups": [
{
"default": "Defaultgroup",
"attribute": "idp_group_attribute"
}
],
"number": {
"attribute": "participant_number"
},
"comment": {
"default": "Vote weight, groups and structure levels set via SSO.",
"attribute": "idp_commentary"
},
"present": {
"default": "True",
"attribute": "presence"
},
"structure_levels": [
{
"default": "structure1",
"attribute": "structure"
}
]
},
"conditions": [
{
"attribute": "member_number",
"condition": "11600.*"
},
{
"attribute": "email",
"condition": "[\\w\\.]+@([\\w-]+\\.)+[\\w]{2,4}"
}
],
"external_id": "meetingHH"
},
{
"name": "meetingHH-Test-Gaeste",
"mappings": {
},
"conditions": [
{
"attribute": "member_number",
"condition": "^(?!11600).*"
}
],
"external_id": "Landtag"
}
],
"is_physical_person": "is_person"
}
The failure seems to be in the objectToFormattedString()
function. One regex breaks the display.
Describe the bug When displaying a saml attribute mapping that contains an empty string inside a nested object like the following, the mapping is cut off after the nested object with ":" and the string is filled with random characters fe. "}],".
How to Reproduce Steps to reproduce the behavior:
Expected behavior The full attribut mapping should be displayed correctly.
Additional context You need to have at least backend PR 2722 or a branch containing this PR to be able to save the mapping.