Show a member's menu to someone who can only edit method permissions, since that's one of its items
This commit is contained in:
parent
326fb33bca
commit
4f01820e3d
1 changed files with 5 additions and 1 deletions
|
|
@ -24,6 +24,10 @@
|
|||
const canBan = $derived($supportedMethods.includes("banpubkey"))
|
||||
const canAssign = $derived($supportedMethods.includes("assignrole"))
|
||||
const canUnassign = $derived($supportedMethods.includes("unassignrole"))
|
||||
const canEditMethods = $derived(
|
||||
$supportedMethods.includes("listmethodassignees") &&
|
||||
["assignmethod", "unassignmethod"].some(method => $supportedMethods.includes(method)),
|
||||
)
|
||||
|
||||
const openProfile = () => pushModal(ProfileDetail, {pubkey, url})
|
||||
</script>
|
||||
|
|
@ -49,7 +53,7 @@
|
|||
<ProfileAbout {pubkey} {url} singleLine />
|
||||
</div>
|
||||
</div>
|
||||
{#if canAssign || canUnassign || canUnallow || canBan}
|
||||
{#if canAssign || canUnassign || canUnallow || canBan || canEditMethods}
|
||||
<div class="pointer-events-auto shrink-0">
|
||||
<MenuButton
|
||||
class="button button-ghost button-sm button-square"
|
||||
|
|
|
|||
Loading…
Reference in a new issue