fix(horde): load OAuth admin page when OAuth is not configured#134
fix(horde): load OAuth admin page when OAuth is not configured#134TDannhauer wants to merge 1 commit into
Conversation
Make RouteUrlWriter optional so controller construction does not fail when URL generation dependencies are incomplete. Show an existing storage-unavailable notice when the null OAuth provider repository is active, and fall back callback URLs to the webroot path.
There was a problem hiding this comment.
I am not really convinced - Nothing in RouteUrlWriter depends on Oauth being configured so it's questionable whatever this fixes for you is really the described behaviour.
Please document how exactly RouteUrlWrite becomes unavailable by disabling / not configuring OAuth.
Generally:
The UrlWriter subsystem is fundamental - if it is not available, we should bail out in a "system temporarily not available" fashion regardless of which endpoint was asked for rather than try to rescue this.
Also if DB is configured but unavailable this is fundamental and "gracefully" starting the system with some resources available and others seemingly disappeared (rather than "currently not available" if the protocol supports it) is actively dangerous in anything synchronizing/consuming
I agree the oauth admin page should survive conditions related to OAuth not yet being configured sufficiently.
|
Closing after re-investigation — the review was right on both counts.
|
Summary
RouteUrlWriteroptional inOAuthProviderControllerso list/edit pages can load without full URL-generation dependenciesMotivation
The OAuth provider admin page should be usable on instances without OAuth configured. Controller construction and the list template should degrade gracefully instead of failing hard when storage or route URL generation is incomplete.
This complements horde/Core#198 (DbServiceFactory Unix-socket fix), which resolves the fatal PDO error on PostgreSQL socket deployments.
Changes
OAuthProviderController: optionalRouteUrlWriter,resolveCallbackUrl(), storage-unavailable view datatemplates/admin/oauthprovider/list.html.php: notice when provider storage is unavailableTest plan
NullOAuthProviderConfigRepositoryis active/horde/admin/authentication/provider/without OAuth providers configured