Skip to content

Commit

Permalink
Fix issue title editing and state change permissions
Browse files Browse the repository at this point in the history
Only delegates and authors should see the edit and state change buttons.
  • Loading branch information
rudolfs committed Oct 31, 2024
1 parent 793c3bd commit 80314b2
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions src/views/repo/Issue.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -396,13 +396,15 @@
{:else}
<div class="title">
<InlineTitle content={issue.title} fontSize="medium" />
<div class="title-icons">
<Icon
styleCursor="pointer"
name="pen"
onclick={() => (editingTitle = !editingTitle)} />
<IssueStateButton state={issue.state} save={saveState} />
</div>
{#if roles.isDelegateOrAuthor( config.publicKey, repo.delegates.map(delegate => delegate.did), issue.discussion[0].author.did, )}
<div class="title-icons">
<Icon
styleCursor="pointer"
name="pen"
onclick={() => (editingTitle = !editingTitle)} />
<IssueStateButton state={issue.state} save={saveState} />
</div>
{/if}
</div>
{/if}
</div>
Expand Down

0 comments on commit 80314b2

Please sign in to comment.