diff --git a/jans-config-api/docs/jans-config-api-swagger.yaml b/jans-config-api/docs/jans-config-api-swagger.yaml index 960e2fbe7ab..42a063b13af 100644 --- a/jans-config-api/docs/jans-config-api-swagger.yaml +++ b/jans-config-api/docs/jans-config-api-swagger.yaml @@ -8219,19 +8219,19 @@ components: type: string selected: type: boolean - whitePagesCanView: - type: boolean - userCanEdit: + adminCanEdit: type: boolean userCanView: type: boolean - adminCanEdit: + userCanEdit: type: boolean adminCanView: type: boolean + userCanAccess: + type: boolean adminCanAccess: type: boolean - userCanAccess: + whitePagesCanView: type: boolean baseDn: type: string @@ -9053,8 +9053,6 @@ components: type: boolean lockMessageConfig: $ref: '#/components/schemas/LockMessageConfig' - fapi: - type: boolean allResponseTypesSupported: uniqueItems: true type: array @@ -9064,6 +9062,8 @@ components: - code - token - id_token + fapi: + type: boolean AuthenticationFilter: required: - baseDn @@ -10083,14 +10083,14 @@ components: type: boolean internal: type: boolean - locationPath: - type: string locationType: type: string enum: - ldap - db - file + locationPath: + type: string baseDn: type: string ScriptError: diff --git a/jans-config-api/server/src/main/java/io/jans/configapi/rest/resource/auth/AttributesResource.java b/jans-config-api/server/src/main/java/io/jans/configapi/rest/resource/auth/AttributesResource.java index cedbd2b5ece..c7bdc485a4e 100644 --- a/jans-config-api/server/src/main/java/io/jans/configapi/rest/resource/auth/AttributesResource.java +++ b/jans-config-api/server/src/main/java/io/jans/configapi/rest/resource/auth/AttributesResource.java @@ -193,15 +193,16 @@ public Response updateAttribute(@Valid JansAttribute attribute) { throwBadRequestException(NAME_CONFLICT, String.format(NAME_CONFLICT_MSG, attribute.getName())); } } - - // check if attribute exists in schema - boolean attributeValidation = attributeService.validateAttributeDefinition(attribute.getName()); - log.info(" ** Validate attribute - attribute.getName():{}, attributeValidation:{}", attribute.getName(), - attributeValidation); - if (!attributeValidation) { - throw new WebApplicationException(getNotAcceptableException( - "The attribute type '" + attribute.getName() + "' not defined in DB schema")); - } + else { + // check if attribute exists in schema + boolean attributeValidation = attributeService.validateAttributeDefinition(attribute.getName()); + log.info(" ** Validate attribute - attribute.getName():{}, attributeValidation:{}", attribute.getName(), + attributeValidation); + if (!attributeValidation) { + throw new WebApplicationException(getNotAcceptableException( + "The attribute type '" + attribute.getName() + "' not defined in DB schema")); + } + } JansAttribute existingAttribute = attributeService.getAttributeByInum(inum); checkResourceNotNull(existingAttribute, JANS_ATTRIBUTE); diff --git a/jans-config-api/server/src/test/resources/feature/attribute/attributes.feature b/jans-config-api/server/src/test/resources/feature/attribute/attributes.feature index 4d162d7e064..649ea1c74a0 100644 --- a/jans-config-api/server/src/test/resources/feature/attribute/attributes.feature +++ b/jans-config-api/server/src/test/resources/feature/attribute/attributes.feature @@ -143,6 +143,7 @@ Scenario: Get an attribute by inum And print response +@ignore @CreateUpdate Scenario: Create new attribute Given url mainUrl