Skip to content

Commit

Permalink
Fixed permissions on change.
Browse files Browse the repository at this point in the history
  • Loading branch information
amyjko committed Oct 12, 2024
1 parent 7b34d4e commit 8ab34e0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/lib/ChangeView.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
const isStatus = (x: string): x is keyof typeof Statuses => x in Statuses;
$: isAdmin = $user && $org.hasAdminPerson($user.id);
$: editable = $user && (isAdmin || change.who === $user.id);
$: editable = $user && (isAdmin || change.who === $user.id || change.lead === $user.id);
$: unselectedRoles = $org
.getRoles()
.filter((r) => !change.roles.includes(r.id))
Expand All @@ -65,7 +65,7 @@
<Title
title={change.what}
kind="change"
edit={$user && isAdmin && change.who === $user.id
edit={editable
? (text) =>
queryOrError(
errors,
Expand Down Expand Up @@ -125,7 +125,7 @@
);
}}
/>{:else if change.lead}<PersonLink profile={$org.getProfileWithID(change.lead)} />{:else}No one{/if}
is in currently leading this change project.</Paragraph
is currently leading this change.</Paragraph
>

<Header>Problem</Header>
Expand Down

0 comments on commit 8ab34e0

Please sign in to comment.