From 80314b2148f4ca57a4302dc43994efe0b33eaaa9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C5=ABdolfs=20O=C5=A1i=C5=86=C5=A1?= Date: Thu, 31 Oct 2024 16:18:58 +0100 Subject: [PATCH] Fix issue title editing and state change permissions Only delegates and authors should see the edit and state change buttons. --- src/views/repo/Issue.svelte | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/views/repo/Issue.svelte b/src/views/repo/Issue.svelte index e00c780..8437b7e 100644 --- a/src/views/repo/Issue.svelte +++ b/src/views/repo/Issue.svelte @@ -396,13 +396,15 @@ {:else}
-
- (editingTitle = !editingTitle)} /> - -
+ {#if roles.isDelegateOrAuthor( config.publicKey, repo.delegates.map(delegate => delegate.did), issue.discussion[0].author.did, )} +
+ (editingTitle = !editingTitle)} /> + +
+ {/if}
{/if}