1
0
forked from baron/baron-sso

Fix org chart manager ordering and title wrapping

This commit is contained in:
2026-06-15 21:11:03 +09:00
parent 44726e5a54
commit b2808759d2
8 changed files with 179 additions and 18 deletions

View File

@@ -214,7 +214,7 @@ function AppLayout() {
});
const orgfrontUrl = buildAuthenticatedOrgChartUrl(
import.meta.env.ORGFRONT_URL || "http://localhost:5175",
{ includeInternal: true },
{ includeInternal: false },
);
// Splice optional menus in a standard order

View File

@@ -71,18 +71,20 @@ describe("orgChartPicker", () => {
);
});
it("builds the admin chart navigation URL with internal visibility enabled", () => {
it("builds the admin chart navigation URL without internal visibility by default", () => {
expect(buildAuthenticatedOrgChartUrl("https://orgchart.example.com/")).toBe(
"https://orgchart.example.com/login?auto=1&returnTo=%2Fchart%3FincludeInternal%3Dtrue",
"https://orgchart.example.com/login?auto=1&returnTo=%2Fchart",
);
});
it("can build chart navigation URL without internal visibility", () => {
it("can build chart navigation URL with internal visibility when explicitly requested", () => {
expect(
buildAuthenticatedOrgChartUrl("https://orgchart.example.com/", {
includeInternal: false,
includeInternal: true,
}),
).toBe("https://orgchart.example.com/login?auto=1&returnTo=%2Fchart");
).toBe(
"https://orgchart.example.com/login?auto=1&returnTo=%2Fchart%3FincludeInternal%3Dtrue",
);
});
it("parses the first tenant id and name from orgfront confirm messages", () => {

View File

@@ -348,7 +348,7 @@ export function buildAuthenticatedOrgChartUserMultiPickerUrl(baseUrl?: string) {
export function buildAuthenticatedOrgChartUrl(
baseUrl?: string,
options: OrgChartLoginOptions = { includeInternal: true },
options: OrgChartLoginOptions = { includeInternal: false },
) {
const normalizedBase =
baseUrl?.trim().replace(/\/+$/, "") || DEFAULT_ORGFRONT_BASE_URL;