Skip to content

Commit 230aafe

Browse files
committed
fix(webapp): gate the disable auto-assign button on Vercel permission
Every other action in the Vercel settings form disables itself and explains why when the role cannot manage the integration. This button did not, so it looked clickable to a viewer even though the action rejects them.
1 parent 0d2df4b commit 230aafe

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

apps/webapp/app/routes/resources.orgs.$organizationSlug.projects.$projectParam.env.$envParam.vercel.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1008,7 +1008,12 @@ function ConnectedVercelProjectForm({
10081008
<Button
10091009
type="button"
10101010
variant="warning/small"
1011-
disabled={isDisablingAutoAssign}
1011+
disabled={isDisablingAutoAssign || !canManageVercel}
1012+
tooltip={
1013+
canManageVercel
1014+
? undefined
1015+
: "You don't have permission to manage the Vercel integration"
1016+
}
10121017
LeadingIcon={isDisablingAutoAssign ? SpinnerWhite : undefined}
10131018
onClick={() =>
10141019
disableAutoAssignFetcher.submit(

0 commit comments

Comments
 (0)