Skip to content

Commit b819013

Browse files
committed
Disable the "Remove Connector" button if the action is not allowed for the user
1 parent 503a2a1 commit b819013

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

frontend/src/components/Connect/List/ActionsCell.tsx

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,9 +167,16 @@ const ActionsCell: React.FC<CellContext<FullConnectorInfo, unknown>> = ({
167167
Reset Connector Offsets
168168
</ActionDropdownItem>
169169
)}
170-
<DropdownItem onClick={handleDelete} danger>
170+
<ActionDropdownItem
171+
onClick={handleDelete}
172+
danger
173+
permission={{
174+
resource: ResourceType.CONNECT,
175+
action: Action.DELETE,
176+
value: connect,
177+
}}>
171178
Remove Connector
172-
</DropdownItem>
179+
</ActionDropdownItem>
173180
</Dropdown>
174181
);
175182
};

0 commit comments

Comments
 (0)