mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-10-12 16:02:56 +00:00
fix: show the flow row edit button to builder operators (#11535)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
27180726a3
commit
6c4e34cd0d
@@ -124,6 +124,8 @@
|
||||
}
|
||||
let scheduleEditor: ScheduleEditor | undefined = $state(undefined)
|
||||
let flowHistory: FlowHistory | undefined = $state(undefined)
|
||||
|
||||
let hideForOperator = $derived($userStore?.operator && !$operatorBuilderFlows)
|
||||
</script>
|
||||
|
||||
{#if menuOpen}
|
||||
@@ -191,25 +193,24 @@
|
||||
{/snippet}
|
||||
{#snippet actions()}
|
||||
<span class="hidden md:inline-flex gap-x-1">
|
||||
{#if !$userStore?.operator}
|
||||
{#if showEditButton && flow.canWrite && !flow.archived}
|
||||
<div>
|
||||
<Button
|
||||
variant="subtle"
|
||||
wrapperClasses="w-20"
|
||||
unifiedSize="md"
|
||||
startIcon={{ icon: Pen }}
|
||||
href="{base}/flows/edit/{flow.path}"
|
||||
aiId={`edit-flow-button-${flow.summary?.length > 0 ? flow.summary : flow.path}`}
|
||||
aiDescription={`Edits the flow ${flow.summary?.length > 0 ? flow.summary : flow.path}`}
|
||||
>
|
||||
Edit
|
||||
</Button>
|
||||
</div>
|
||||
{/if}
|
||||
{#if !isCloudHosted() && editInForkAllowed($workspaceStore, $userWorkspaces) && (!showEditButton || !flow.canWrite)}
|
||||
<EditInForkButton itemType="flow" path={flow.path} />
|
||||
{/if}
|
||||
{#if !hideForOperator && showEditButton && flow.canWrite && !flow.archived}
|
||||
<div>
|
||||
<Button
|
||||
variant="subtle"
|
||||
wrapperClasses="w-20"
|
||||
unifiedSize="md"
|
||||
startIcon={{ icon: Pen }}
|
||||
href="{base}/flows/edit/{flow.path}"
|
||||
aiId={`edit-flow-button-${flow.summary?.length > 0 ? flow.summary : flow.path}`}
|
||||
aiDescription={`Edits the flow ${flow.summary?.length > 0 ? flow.summary : flow.path}`}
|
||||
>
|
||||
Edit
|
||||
</Button>
|
||||
</div>
|
||||
{/if}
|
||||
<!-- Hidden from every operator, builder rights included. -->
|
||||
{#if !$userStore?.operator && !isCloudHosted() && editInForkAllowed($workspaceStore, $userWorkspaces) && (!showEditButton || !flow.canWrite)}
|
||||
<EditInForkButton itemType="flow" path={flow.path} />
|
||||
{/if}
|
||||
</span>
|
||||
|
||||
@@ -220,7 +221,6 @@
|
||||
let { draft_only, path, archived } = flow
|
||||
let owner = isOwner(path, $userStore, $workspaceStore)
|
||||
const canEdit = flow.canWrite && showEditButton
|
||||
const hideForOperator = $userStore?.operator && !$operatorBuilderFlows
|
||||
if (draft_only) {
|
||||
return [
|
||||
...selectMenuItems(rowSelection),
|
||||
|
||||
Reference in New Issue
Block a user