Update BreedBase to allow for the POST /variables and PUT /variables endpoints to be enabled or disabled based on a configuration property.
Jira story: https://breedinginsight.atlassian.net/browse/BI-1609
Techspecs
- Update sgn.conf to have two new configurations:
- brapi_post_variables with a default value of 0
- brapi_put_variables with a default value of 0
- In lib/SGN/Controller/AJAX/BrAPI.pm update the POST variables method to check the value of the brapi_post_variables
- if true, continue with the rest of the method
- if false, return a 404
- In lib/SGN/Controller/AJAX/BrAPI.pm update the PUT variables method to check the value of the brapi_put_variables
- if true, continue with the rest of the method
- if false, return a 404
- In lib/SGN/Controller/AJAX/BrAPI.pm update the serverInfo method:
- include POST /variables in the response if brapi_post_variables is true
- include PUT /variables in the response if brapi_put_variables is true