From 74802f8ca47302d66d12b9bf0b099422da6b578b Mon Sep 17 00:00:00 2001 From: shekhar16 Date: Wed, 15 Jan 2025 17:53:23 +0530 Subject: [PATCH] fix(oxtrust): saml1 and saml2 get save on update Signed-off-by: shekhar16 --- .../org/gluu/oxtrust/action/UpdateAttributeAction.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/oxTrust/server/src/main/java/org/gluu/oxtrust/action/UpdateAttributeAction.java b/oxTrust/server/src/main/java/org/gluu/oxtrust/action/UpdateAttributeAction.java index 83cb65c4..2abdd661 100644 --- a/oxTrust/server/src/main/java/org/gluu/oxtrust/action/UpdateAttributeAction.java +++ b/oxTrust/server/src/main/java/org/gluu/oxtrust/action/UpdateAttributeAction.java @@ -279,6 +279,13 @@ public String saveImpl() { return OxTrustConstants.RESULT_VALIDATION_ERROR; } + if (attribute.getSaml1Uri() == null || attribute.getSaml1Uri().equals("")) { + attribute.setSaml1Uri("urn:gluu:dir:attribute-def:" + attributeName); + } + if (attribute.getSaml2Uri() == null || attribute.getSaml2Uri().equals("")) { + attribute.setSaml2Uri("urn:oid:" + attributeName); + } + attributeService.updateAttribute(this.attribute); oxTrustAuditService.audit( "ATTRIBUTE " + this.attribute.getInum() + " **" + this.attribute.getDisplayName()