Skip to content

Commit 8d38c2f

Browse files
fix(wand): should not be able to use wand ui without write/admin perms (#2384)
1 parent 9762bbc commit 8d38c2f

File tree

1 file changed

+4
-1
lines changed
  • apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block

1 file changed

+4
-1
lines changed

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/sub-block.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ const renderLabel = (
157157
isWandEnabled: boolean
158158
isPreview: boolean
159159
isStreaming: boolean
160+
disabled: boolean
160161
onSearchClick: () => void
161162
onSearchBlur: () => void
162163
onSearchChange: (value: string) => void
@@ -175,6 +176,7 @@ const renderLabel = (
175176
isWandEnabled,
176177
isPreview,
177178
isStreaming,
179+
disabled,
178180
onSearchClick,
179181
onSearchBlur,
180182
onSearchChange,
@@ -208,7 +210,7 @@ const renderLabel = (
208210
</div>
209211

210212
{/* Wand inline prompt */}
211-
{isWandEnabled && !isPreview && (
213+
{isWandEnabled && !isPreview && !disabled && (
212214
<div className='flex min-w-0 flex-1 items-center justify-end pr-[4px]'>
213215
{!isSearchActive ? (
214216
<Button
@@ -824,6 +826,7 @@ function SubBlockComponent({
824826
isWandEnabled,
825827
isPreview,
826828
isStreaming: wandControlRef.current?.isWandStreaming ?? false,
829+
disabled: isDisabled,
827830
onSearchClick: handleSearchClick,
828831
onSearchBlur: handleSearchBlur,
829832
onSearchChange: handleSearchChange,

0 commit comments

Comments
 (0)