diff --git a/ui/src/org/OrgOverviewPage.vue b/ui/src/org/OrgOverviewPage.vue index 3154862a3..b9ec720d4 100644 --- a/ui/src/org/OrgOverviewPage.vue +++ b/ui/src/org/OrgOverviewPage.vue @@ -47,14 +47,18 @@ const areas = computed(() => { return allAreas.filter((area) => !hidden.includes(area.to)); }); const org = computed(() => orgStore.org); -const canRename = computed(() => org.value?.role === "owner"); +// The single binary reports a revision with every org and serves the rename +// routes and their history. A server without one has neither, so the controls +// stay hidden rather than calling an endpoint it does not have. +const renamesHere = computed(() => typeof org.value?.version === "number"); +const canRename = computed(() => renamesHere.value && org.value?.role === "owner"); const history = ref([]); const historyLoading = ref(true); const historyError = ref(""); async function loadHistory(): Promise { - if (!org.value) return; + if (!org.value || !renamesHere.value) return; try { history.value = ( await api.orgHistory<{ events: OrgEvent[] }>(org.value.id) @@ -139,7 +143,7 @@ function describeChange(event: OrgEvent): string { -
+

Loading changes…

diff --git a/ui/src/org/OrgWorkspacesPage.vue b/ui/src/org/OrgWorkspacesPage.vue index f4fcf1955..b5655b631 100644 --- a/ui/src/org/OrgWorkspacesPage.vue +++ b/ui/src/org/OrgWorkspacesPage.vue @@ -43,8 +43,10 @@ const error = ref(""); const loading = ref(true); const busy = ref(false); -const canCreate = computed(() => org.value?.role === "owner" || org.value?.role === "admin"); -const canRename = computed(() => org.value?.role === "owner"); +// A server that reports no role is the older one: it still lets any member +// create a workspace and has no rename route. +const canCreate = computed(() => !org.value?.role || org.value.role === "owner" || org.value.role === "admin"); +const canRename = computed(() => typeof org.value?.version === "number" && org.value.role === "owner"); async function load(): Promise { if (!org.value) return;