fix: account management url visibility (#32645)

(cherry picked from commit 22fe7b4179464c73d7e0487df90f2064fa30a5e0)
This commit is contained in:
Jason Rasmussen
2026-10-22 20:43:14 +03:00
committed by Codex
parent 493870ad7b
commit 9a66f16102
4 changed files with 13 additions and 11 deletions
+5
View File
@@ -33974,6 +33974,11 @@
}, },
"UserConfigOAuthDto": { "UserConfigOAuthDto": {
"properties": { "properties": {
"accountManagementUrl": {
"default": "",
"description": "Account management URL",
"type": "string"
},
"autoLaunch": { "autoLaunch": {
"description": "Auto launch", "description": "Auto launch",
"type": "boolean" "type": "boolean"
+2
View File
@@ -1616,6 +1616,8 @@ export type UserConfigNotificationsDto = {
smtp: UserConfigSmtpDto; smtp: UserConfigSmtpDto;
}; };
export type UserConfigOAuthDto = { export type UserConfigOAuthDto = {
/** Account management URL */
accountManagementUrl?: string;
/** Auto launch */ /** Auto launch */
autoLaunch: boolean; autoLaunch: boolean;
/** Button text */ /** Button text */
+2 -1
View File
@@ -303,7 +303,8 @@ const AdminConfigSchemaWithVisibility = z
accountManagementUrl: emptyOrUrl('Account management URL must be an empty string or a valid URL') accountManagementUrl: emptyOrUrl('Account management URL must be an empty string or a valid URL')
.describe('Account management URL') .describe('Account management URL')
.optional() .optional()
.default(''), .default('')
.meta({ visibility: User }),
scope: z.string().describe('Scope'), scope: z.string().describe('Scope'),
prompt: z.string().describe('OAuth prompt parameter (e.g. select_account, login, consent)'), prompt: z.string().describe('OAuth prompt parameter (e.g. select_account, login, consent)'),
endSessionEndpoint: emptyOrUrl('endSessionEndpoint must be an empty string or a valid URL').describe( endSessionEndpoint: emptyOrUrl('endSessionEndpoint must be an empty string or a valid URL').describe(
@@ -9,15 +9,9 @@
import { fade } from 'svelte/transition'; import { fade } from 'svelte/transition';
import { createPreloadedQuery } from '$lib/queries/client'; import { createPreloadedQuery } from '$lib/queries/client';
import { getUserConfigQuery } from '$lib/queries/config-user.query'; import { getUserConfigQuery } from '$lib/queries/config-user.query';
import { getServerConfigQuery } from '$lib/queries/server.query';
const queries = { const query = createPreloadedQuery(getUserConfigQuery);
config: createPreloadedQuery(getUserConfigQuery), const config = $derived(query.data);
serverConfig: createPreloadedQuery(getServerConfigQuery),
};
const config = $derived(queries.config.data);
const serverConfig = $derived(queries.serverConfig.data);
let loading = $state(true); let loading = $state(true);
@@ -58,8 +52,8 @@
</div> </div>
{:else if config.oauth.enabled} {:else if config.oauth.enabled}
{#if authManager.user.oauthId} {#if authManager.user.oauthId}
{#if serverConfig.oauthAccountManagementUrl} {#if config.oauth.accountManagementUrl}
<Button shape="round" size="small" href={serverConfig.oauthAccountManagementUrl} <Button shape="round" size="small" href={config.oauth.accountManagementUrl}
>{$t('manage_oauth_account')}</Button >{$t('manage_oauth_account')}</Button
> >
{/if} {/if}