Skip to content

Allow editing disabled redirects#4200

Open
Gilmoursa wants to merge 1 commit into
johngodley:trunkfrom
Gilmoursa:fix/allow-editing-disabled-redirects
Open

Allow editing disabled redirects#4200
Gilmoursa wants to merge 1 commit into
johngodley:trunkfrom
Gilmoursa:fix/allow-editing-disabled-redirects

Conversation

@Gilmoursa
Copy link
Copy Markdown

Summary

Fixes #4106.

Currently the Edit action in the redirect row menu is only shown when a redirect is enabled. This forces users to re-enable a redirect, make their edits, then disable it again — an unnecessary extra step.

The fix removes the enabled && guard from the Edit action condition in row-actions.tsx, so the Edit button appears for both enabled and disabled redirects. The capability check (CAP_REDIRECT_ADD) is preserved, and the Enable/Disable toggle is unaffected.

The "Check Redirect" action intentionally keeps its enabled guard since checking a live redirect doesn't make sense when it's disabled.

Changes

  • src/page/redirects/row-actions.tsx: remove enabled && from the Edit row action condition

Test plan

  • Create a redirect and disable it
  • Confirm the Edit action appears in the row menu
  • Edit the redirect while disabled — changes save correctly
  • Confirm the redirect remains disabled after editing
  • Confirm Edit still works for enabled redirects
  • Confirm "Check Redirect" is still only shown for enabled redirects

Remove the `enabled` guard from the Edit row action so users can edit
redirects without needing to re-enable them first.

Fixes johngodley#4106
Copilot AI review requested due to automatic review settings May 15, 2026 12:15
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Enables editing redirects even when they are disabled, removing an unnecessary workflow step for users managing temporary or staged redirects (Fixes #4106).

Changes:

  • Show the Edit row action regardless of redirect enabled state (capability-gated by CAP_REDIRECT_ADD).
  • Keep Check Redirect action gated by enabled (and existing non-regex/url match constraints).
  • Leave the Enable/Disable toggle logic unchanged.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request] Allow editing disabled redirections

2 participants