diff --git a/components/filters/filter-rule-modal.tsx b/components/filters/filter-rule-modal.tsx index 3fca0201f..090d5e19c 100644 --- a/components/filters/filter-rule-modal.tsx +++ b/components/filters/filter-rule-modal.tsx @@ -224,6 +224,9 @@ export function FilterRuleModal({ const otherForwards = forwardsBefore + (ruleStops({ actions, stopProcessing }) ? 0 : forwardsAfter); const forwardLimit = typeof maxRedirects === "number" && maxRedirects > 0 ? maxRedirects : null; const forwardOverLimit = forwardLimit !== null && forwardCount + otherForwards > forwardLimit; + // A limit of 0: the server runs no redirect at all, as the out of office + // card also takes it. A forward the rule already has stays, to be removed. + const forwardUnavailable = maxRedirects === 0; // While editing, condition.value is always the raw string typed into the // input (commas not yet split). Convert to array form here on save so a @@ -615,7 +618,7 @@ export function FilterRuleModal({ className={selectClass} aria-label={t("actions")} > - {ALL_ACTION_TYPES.map((a) => ( + {ALL_ACTION_TYPES.filter((a) => !(forwardUnavailable && a === "forward" && action.type !== "forward")).map((a) => (