feat: #3585858 warn on policies inconsistent with the pre-notification gating

The policy edit form already warns when the 'Users pre-notified only' condition is active but pre-deletion notifications are disabled (no user would ever be purged). Mirror that for the inverse case: when pre-deletion notifications are effectively enabled but the condition is not active, the notification email is sent but purges happen without waiting for it -- which is usually not what the admin intended.

Refactor hasNotificationConflict() into getNotificationInconsistency() returning 'blocked', 'ungated', or NULL, since the two states are mutually exclusive and share the same cascade resolution. Callers switch on the return to show the appropriate warning inline in the form and as a flashed message on save. Use messages--error (addError) for the 'blocked' case -- the policy is functionally broken, no user will ever be purged -- and messages--warning (addWarning) for the 'ungated' case, where the policy still works but without waiting for the notification.

Split out from #3521201 (MR !51 (merged)) so that MR can focus on the global flow fix.

Closes #3585858

Merge request reports

Loading