The panel is told what the public answer withholds - #96
Merged
Conversation
`GET /instance/redirects`, behind `instance:update`: the two columns as they are, with the provider's name and one of four states. The public projection filters a redirect against the enabled providers, which is what keeps a visitor off a dead end — and is also why the screen that writes those columns could not read them, and blanked one it could not see. Five tests, each sabotaged. `A_save_that_omits_the_redirect_keeps_it_while_the _provider_is_off` is the one that was missing: the existing walk disables a provider and asserts the column survives, but never sends a settings PUT in between.
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.
A save from the manager panel could clear a redirect nobody touched.
InstanceServicefilters both redirect slugs against the enabled providersbefore serving them, and that filter is load-bearing — it is what stops a
disabled provider turning the sign-in screen into a dead end, and what lets
pre-configuration name a slug before any provider exists. But the panel's form
has no read of its own, so it seeded itself from that same filtered answer: while
a provider was switched off the two pickers read None, and any save of that tab
wrote the blank back.
GET /instance/redirects, behindinstance:updateand besideGET /instance/external-content. It answers the columns as they are, with theprovider's display name whether or not it is enabled, and one of four states:
none,inForce,disabled,unregistered.Its own call rather than a field on
getInstanceInfo, for two reasons ratherthan one. A visitor must never learn the slug of a provider that is switched off
— and
AnnounceAsyncsendsInstanceInfoDtoto every non-anonymised user onthe socket, so a field meant for a manager would reach everybody at the next
instance write.
Nothing else changed.
InForce,InstanceInfoDto,InstanceSettingsInputDtoand
RedirectProviderAsyncare untouched; absent still means leave alone, blankstill clears, and a slug naming no enabled provider is still 422. One comment did
change, because it was not true:
RedirectProviderAsyncclaimed its check is whatkeeps a visitor off a dead end, which
PreconfigurationServicecontradicts bywriting the column with no check at all. The read-time filter is what does that.
Tests
Five, each shown to fail against the thing it was written for:
InForce; and separately, deleteInForce— the same test also asserts the anonymous answer stays silentEnabledalone, andunregisteredcollapses intodisabledinstance:updatereads itRequireAsynclineNameis read, unconditionally, and the wipe comes backThe fourth is the one the suite was missing.
Disabling_a_provider_takes_the_ redirect_out_of_force_and_does_not_forget_italready walks disable → read →assert the column survives → re-enable; it never sends a settings
PUTinbetween, which is the single step that would have caught this.
SettingsRedirectinggained an overload that states the register column too —no test has ever touched it, and this change should not inherit that.
823 passed, 0 failed, 2 skipped of 825. Build with
-warnaserror, zero warnings.openapi.jsonregenerated from the container: one path, two schemas, 66insertions and no deletions.