Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Server side validation for restricted values #93

Merged
merged 13 commits into from
Aug 2, 2024

Conversation

jack-brinkman
Copy link
Contributor

Service Changes

  • Added REST endpoint for retrieving all restricted values in the UI
  • Added REST endpoint for retrieving specific restricted values in the UI (lists, licenses, regions)
  • Added constraintService for retrieving & interfacing with the restricted values
  • Added validation step for list ingress
  • Refactored AuthUtils

UI Changes

  • Added call to REST constraint endpoint to retrieve restricted values, with JSON fallback (if the request fails)
  • Combined constraint JSON files into one (contraints.json) for parity with the REST endpoint

@jack-brinkman jack-brinkman added the bug Something isn't working label Apr 17, 2024
@jack-brinkman jack-brinkman self-assigned this Apr 17, 2024
@jack-brinkman jack-brinkman changed the title Initial implementation for #82 Server side validation for restricted values Apr 17, 2024
@jack-brinkman jack-brinkman added enhancement New feature or request and removed bug Something isn't working labels Apr 17, 2024
Copy link
Contributor

@adam-collins adam-collins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The validation needs to be included in the graphQL controller as well.

lists-service/pom.xml Outdated Show resolved Hide resolved
Copy link
Contributor

@adam-collins adam-collins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a general issue with the introduction of a region constraint, as implied by existing code, the issues raised, and these changes. I think it is a bit of a mess and the simplest solution is to remove this new requirement that region is mandatory. This would simplify implementation, better support use outside of the ALA, simplify data migration, simplify alterations to the region definition list.

lists-service/src/main/docker/application.properties Outdated Show resolved Hide resolved
public class UtilsController {
@Autowired protected ValidationService validationService;

@Operation(tags = "REST", summary = "Get all constraint lists")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The openapi annotations could be more detailed. I'll leave this as optional as the same can be said for the other services.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants