Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
We'll document all notable changes in this file, including bug fixes, enhancements, and dependency updates.
Dates should be in`YYYY-MM-DD` format and versions are in [semantic versioning](http://semver.org/) format.

## v0.10.4 2026-10-05

### Fixed

- Process pages no longer show "Internal Error" to people who aren't logged in.
- Process pages now list the changes suggested for that process.
- People outside an organization no longer see edit controls on its processes.

## v0.10.3 2026-10-03

### Fixed
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "adminima",
"version": "0.10.3",
"version": "0.10.4",
"private": true,
"scripts": {
"dev": "vite dev",
Expand Down
7 changes: 4 additions & 3 deletions src/lib/Oops.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@
let { text = undefined, inline = false, children }: Props = $props();
</script>

<div class:inline>
<!-- A span when inline, since a div inside a paragraph is invalid HTML and breaks hydration. -->
<svelte:element this={inline ? 'span' : 'div'} class="oops" class:inline>
{#if text}<span>{typeof text === 'string' ? text : 'Error'}</span>{/if}
<span class="sub">{@render children?.()}</span>
</div>
</svelte:element>

<style>
div {
.oops {
display: flex;
flex-direction: column;
background: var(--error);
Expand Down
3 changes: 3 additions & 0 deletions src/lib/ReferenceView.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
<RoleLink {role} />
{:else if process}
<ProcessLink {process} />
{:else if !context().member}
<!-- Non-members may not be able to see the org's roles, so just show the text the author wrote. -->
{segment.text}
{:else}
<!-- Say so, rather than rendering a link that silently goes nowhere. -->
<Oops inline text="Unknown role or process: {segment.target}" />
Expand Down
4 changes: 3 additions & 1 deletion src/routes/org/[orgid]/process/[processid]/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,12 @@

// This mirrors the row-level security policy: only admins and people with an accountable or responsible role can edit this policy.
let isAdmin = $derived(orgContext().admin);
let isMember = $derived(orgContext().member);
let accountable = $derived(
$user !== null &&
process !== null &&
(process.accountable === null || personRoles.includes(process.accountable))
// If no one is accountable, anyone in the org can edit it, not anyone logged in.
(process.accountable === null ? isMember : personRoles.includes(process.accountable))
);
let responsible = $derived(
$user !== null &&
Expand Down
2 changes: 1 addition & 1 deletion src/routes/org/[orgid]/process/[processid]/+page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export async function load({ parent, params }) {
] = await Promise.all([
Organization.queryProcessHows(supabase, process.id),
Organization.queryRoles(supabase, org.id),
Organization.queryProcessChanges(supabase, org.id),
Organization.queryProcessChanges(supabase, process.id),
Organization.queryConcerns(supabase, org.id),
Organization.queryPersonRoles(supabase, org.id, uid),
Organization.queryProfiles(supabase, org.id)
Expand Down
Loading