Repository navigation
GH Issue 1721: Site settings API helper and tests - #3254
Merged
Merged
Conversation
Merged
3 of 4 tasks
Contributor
Author
|
Tested locally with SiteSettingsApiTest and AdminConsoleTest. |
labkey-jeckels
marked this pull request as ready for review
October 19, 2026 20:42
labkey-tchad
approved these changes
Oct 20, 2026
labkey-tchad
left a comment
Member
There was a problem hiding this comment.
This is great. Thank you.
labkey-jeckels
added a commit
to LabKey/platform
that referenced
this pull request
Oct 20, 2026
…ugh them (#8189) ## Rationale Add APIs that read and update site settings by name, and make the site settings page save through the update API so the page and the API share one save path and the same validation. [GH Issue 1721](LabKey/internal-issues#1721) Tests and provisioning scripts can then change a setting and put it back without driving the admin page. ## Related Pull Requests - LabKey/testAutomation#3254 ## Changes - A new GET API returns every site setting, and a new POST API updates any subset by name; an unknown name or invalid value fails the whole request and saves nothing. - Updates are validated against the saved values plus the requested changes, run the HTTPS connectivity check before SSL is required, and are audited like a page save. - Usage reporting level can't be changed on distributions where reporting is always on. - The site settings page saves through the update API and shows validation errors in place. - Invalid reporting levels are now rejected instead of silently ignored, and a setting left out of a save keeps its current value. Tested locally with the SiteSettingsUpdater and AdminController server-side tests, plus SiteSettingsApiTest and AdminConsoleTest. ## Tasks - [x] Claude Code Review - [x] Manual Testing @labkey-gokhano - Passed: see the test results below. Just a minor non-blocking question also posted as comment. - [x] Test Automation - [ ] User Education: For someone who might have scripted site setting updates via HTTP (no previously supported API was available): `admin-customizeSite` no longer accepts POST and returns 405; scripts that form-posted site settings must call `admin-updateSiteSettings.api` with setting names from `admin-getSiteSettings.api`. @labkey-hannah - This could have been someone's workflow as part of restoring a production DB to a staging server, for example. We've typically recommended doing SQL scripts for that, so I think it's unlikely to hit anyone.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rationale
Add a test helper for the new site settings APIs so tests can change site settings and restore them from cleanup code without navigating the browser. GH Issue 1721
Related Pull Requests
Changes