diff --git a/src/lib/helpers/oauth2-authorization-details.ts b/src/lib/helpers/oauth2-authorization-details.ts index 367d3d3d2..3d6caf744 100644 --- a/src/lib/helpers/oauth2-authorization-details.ts +++ b/src/lib/helpers/oauth2-authorization-details.ts @@ -287,7 +287,9 @@ export async function searchOrganizations( try { const queries = [Query.offset(offset), Query.limit(limit)]; const trimmed = term.trim(); - if (trimmed !== '') queries.push(Query.search('name', trimmed)); + // startsWith over search: search is full-text (word-boundary) matching, + // which drops partial-fragment matches; this mirrors the project search. + if (trimmed !== '') queries.push(Query.startsWith('name', trimmed)); const orgs = await getTeamOrOrganizationList(queries); return { diff --git a/src/lib/helpers/oauth2-scopes.ts b/src/lib/helpers/oauth2-scopes.ts index 2775ce7fe..9cc3554bb 100644 --- a/src/lib/helpers/oauth2-scopes.ts +++ b/src/lib/helpers/oauth2-scopes.ts @@ -476,6 +476,8 @@ export interface PermissionGroup { heading: string; /** Contextual note under the heading, e.g. which resources it applies to. */ note?: string; + /** Whether the consent screen lets the user collapse this group. */ + collapsible?: boolean; lines: PermissionLine[]; } @@ -666,6 +668,7 @@ export function buildConsentPermissions(model: ConsentScopeModel): PermissionGro groups.push({ heading: 'Projects', note: 'Applies only to the projects you select below.', + collapsible: true, lines: projectLines }); } @@ -680,6 +683,7 @@ export function buildConsentPermissions(model: ConsentScopeModel): PermissionGro groups.push({ heading: 'Organizations', note: 'Applies only to the organizations you select below.', + collapsible: true, lines: organizationLines }); } diff --git a/src/routes/(public)/oauth2/consent-card.svelte b/src/routes/(public)/oauth2/consent-card.svelte index d91a7bca3..68018bb10 100644 --- a/src/routes/(public)/oauth2/consent-card.svelte +++ b/src/routes/(public)/oauth2/consent-card.svelte @@ -686,9 +686,7 @@ {#if showPermissions}