Skip to content

Commit

Permalink
Merge pull request #2390 from GluuFederation/issues_2378
Browse files Browse the repository at this point in the history
feat(oxtrust-sever):set oxTrustActive always without ui #2378
  • Loading branch information
yurem authored Nov 10, 2023
2 parents f3c5f95 + 6baae97 commit b01ddd8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -569,8 +569,10 @@ public String save() throws Exception {
}
if (customAttribute.getName().equalsIgnoreCase("oxTrustActive")) {
if(gluuStatus.equalsIgnoreCase("active")) {
customAttribute.setValue(GluuBoolean.TRUE);
customAttribute.setBooleanValue(GluuBoolean.TRUE);
}else {
customAttribute.setValue(GluuBoolean.FALSE);
customAttribute.setBooleanValue(GluuBoolean.FALSE);
}
}
Expand Down
4 changes: 2 additions & 2 deletions server/src/main/webapp/WEB-INF/incl/person/userForm.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
value="#{_customAttributeAction.attributeIds[_custAttr.metadata]}"/>
<ox:decorate id="D"
label="#{_custAttr.metadata.displayName eq 'Gender, male or female' ? 'Gender' : _custAttr.metadata.displayName } #{_valueIdx == 0 ? '' : _valueIdx}"
rendered="#{(_custAttr.adminCanEdit or _mustEnter) and (_custAttr.metadata.displayName ne 'Password')}"
rendered="#{(_custAttr.adminCanEdit or _mustEnter) and (_custAttr.metadata.displayName ne 'Password') and (_custAttr.metadata.name ne 'oxTrustActive')}"
leftClass="col-sm-3" rightClass="col-sm-9">
<div class="col-xs-10" id="attributeID">
<h:inputText
Expand Down Expand Up @@ -168,7 +168,7 @@
styleClass="rounded form-control #{_custAttr.metadata.displayName}"
value="#{_custAttr.booleanValues[_valueIdx]}"
required="#{_mustEnter}" id="custId_boolean#{_custAttrIdx}"
rendered="#{(_custAttr.adminCanEdit or _mustEnter) and (_custAttr.metadata.dataType.value eq 'boolean') and (_custAttr.metadata.displayName ne 'User Status') }">
rendered="#{((_custAttr.adminCanEdit or _mustEnter) and (_custAttr.metadata.dataType.value eq 'boolean') and (_custAttr.metadata.displayName ne 'User Status') and (_custAttr.metadata.name ne 'oxTrustActive')) }">
<f:selectItems
value="#{organizationService.javaBooleanSelectionTypes}"
var="_type" itemLabel="#{_type.displayName}"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -520,6 +520,7 @@ public List<GluuCustomAttribute> getMandatoryAtributes() {
mandatoryAttributes.add(new GluuCustomAttribute("mail", "", true, true));
mandatoryAttributes.add(new GluuCustomAttribute("userPassword", "", true, true));
mandatoryAttributes.add(new GluuCustomAttribute("gluuStatus", "", true, true));
mandatoryAttributes.add(new GluuCustomAttribute("oxTrustActive", "", true, true));
}
return mandatoryAttributes;
}
Expand Down

0 comments on commit b01ddd8

Please sign in to comment.