Skip to content

Commit

Permalink
WFCORE-4041: fix attribute definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
michpetrov committed Nov 23, 2021
1 parent 34de6f2 commit d511f50
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 5 deletions.
Expand Up @@ -113,7 +113,6 @@ static class AttributeMappingObjectDefinition {

static final SimpleAttributeDefinition RECURSIVE_SEARCH = new SimpleAttributeDefinitionBuilder(ElytronDescriptionConstants.SEARCH_RECURSIVE, ModelType.BOOLEAN, true)
.setRequires(ElytronDescriptionConstants.FILTER)
.setDefaultValue(ModelNode.TRUE)
.setAllowExpression(true)
.setFlags(AttributeAccess.Flag.RESTART_RESOURCE_SERVICES)
.build();
Expand Down Expand Up @@ -324,7 +323,6 @@ static class IdentityMappingObjectDefinition {

static final SimpleAttributeDefinition USE_RECURSIVE_SEARCH = new SimpleAttributeDefinitionBuilder(ElytronDescriptionConstants.USE_RECURSIVE_SEARCH, ModelType.BOOLEAN, true)
.setRequires(ElytronDescriptionConstants.SEARCH_BASE_DN)
.setDefaultValue(ModelNode.FALSE)
.setAllowExpression(true)
.setFlags(AttributeAccess.Flag.RESTART_RESOURCE_SERVICES)
.build();
Expand Down Expand Up @@ -505,7 +503,7 @@ private void configureIdentityMapping(OperationContext context, ModelNode model,
}

ModelNode useRecursiveSearchNode = IdentityMappingObjectDefinition.USE_RECURSIVE_SEARCH.resolveModelAttribute(context, identityMappingNode);
if (useRecursiveSearchNode.asBoolean()) {
if (useRecursiveSearchNode.isDefined() && useRecursiveSearchNode.asBoolean()) {
identityMappingBuilder.searchRecursive();
}

Expand Down
Expand Up @@ -144,7 +144,6 @@ class SaslServerDefinitions {
static final SimpleAttributeDefinition VERSION_COMPARISON = new SimpleAttributeDefinitionBuilder(ElytronDescriptionConstants.VERSION_COMPARISON, ModelType.STRING, false)
.setRequired(false)
.setAllowExpression(true)
.setDefaultValue(new ModelNode(ElytronDescriptionConstants.LESS_THAN))
.setRequires(ElytronDescriptionConstants.PROVIDER_VERSION)
.setAllowedValues(ElytronDescriptionConstants.LESS_THAN, ElytronDescriptionConstants.GREATER_THAN)
.setValidator(EnumValidator.create(Comparison.class, true, true))
Expand Down
Expand Up @@ -107,7 +107,6 @@ public abstract class DomainControllerWriteAttributeHandler extends ReloadRequir
.setRequired(false)
.setAllowExpression(true)
.setValidator(new EnumValidator(Protocol.class, true, true))
.setDefaultValue(org.jboss.as.remoting.Protocol.REMOTE.toModelNode())
.setFlags(AttributeAccess.Flag.RESTART_ALL_SERVICES)
.setRequires(ModelDescriptionConstants.HOST, ModelDescriptionConstants.PORT)
.build();
Expand Down

0 comments on commit d511f50

Please sign in to comment.