From b854f1cd0f33106fa8b7b49bf071f256b480784d Mon Sep 17 00:00:00 2001 From: Sebastian Martinez Date: Fri, 7 Feb 2025 09:28:08 +0100 Subject: [PATCH] Only allow delegates to add labels or assignees to issues during creation Non delegates are not allowed to execute the `assign` or the `label` action on an issue so the issue creation fails silently. So we should probably hide that in the issue creation. --- src/views/repo/CreateIssue.svelte | 55 ++++++++++++++++++------------- 1 file changed, 32 insertions(+), 23 deletions(-) diff --git a/src/views/repo/CreateIssue.svelte b/src/views/repo/CreateIssue.svelte index 79fdd605c..4c9c2069f 100644 --- a/src/views/repo/CreateIssue.svelte +++ b/src/views/repo/CreateIssue.svelte @@ -8,6 +8,7 @@ import { invoke } from "@app/lib/invoke"; + import * as roles from "@app/lib/roles"; import * as router from "@app/lib/router"; import { nodeRunning } from "@app/lib/events"; @@ -141,31 +142,39 @@ {/if} -
- - + {#if !!roles.isDelegate( config.publicKey, repo.delegates.map(delegate => delegate.did), )} +
+ + - + - - -
+ +
+
+ {/if}