Handle validation when the unified keys is entered on Uplink managed license fields - #2972
Handle validation when the unified keys is entered on Uplink managed license fields#2972pramodjodhani wants to merge 5 commits into
Conversation
Tribe__PUE__Checker is not initialised for Uplink managed license fields (i.e. Seating and Event Tickets Plus) so the imporved validation applied for "LWSW-" pastes was not being applied. Needed to utilise stellarwp/uplink/tec/client_validate_license filter to apply the improved validation to Uplink managed license fields.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
📝 WalkthroughSummary by CodeRabbit
WalkthroughChangesHarbor now intercepts Uplink license validation, rejects unified keys for unmanaged products, and returns synthetic responses for Harbor-managed products. PUE disables managed license inputs and reuses Harbor’s license message. Integration tests cover validation, rendering, update checks, and message content. Sequence Diagram(s)sequenceDiagram
participant Uplink
participant PUE
participant Harbor
participant UnifiedLicenseManager
Uplink->>PUE: Render license field
PUE->>Harbor: Check Harbor-managed product
Harbor-->>PUE: Return managed-license status
PUE-->>Uplink: Render readonly and disabled input
Uplink->>Harbor: Submit license validation
Harbor->>UnifiedLicenseManager: Resolve managed license resource
UnifiedLicenseManager-->>Harbor: Return resource key
Harbor-->>Uplink: Return valid response and license-manager message
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@coderabbitai review |
✅ Action performedReview finished.
|
🎫 Ticket
SMNTC-2004
🗒️ Description
LWSW-…) into a legacy per-product field, show a clear Unified License Manager message instead of a generic invalid-key error.Two validation pipelines:
Tribe__PUE__Checker::validate_key) viatec_common_pue_pre_validate_key: Promoter, ECP, Filter BarClient::validate_license) viastellarwp/uplink/tec/client_validate_license: Seating, Event Tickets PlusUplink rewrite runs only for Licenses UI AJAX (
pue-validate-key-uplink-*). Plugin update checks pass through so Dashboard → Updates still getsversion/download_url.🎥 Artifacts
Loom: https://www.loom.com/share/e8b343d9a2bd4cbb9c58607543080047
Test plan
LWSW-license key, in ETP and Seating. You should get “Click here to enter it in the Unified License Manager” message.LWSW-. You should get “This is a unified license key. To activate it, install The Events Calendar Pro or Event Ticket Plus....".LWSW-→ click-here error; key is not stored as a per-product key.✔️ Checklist
npm run changelogto add changelog file(s). More info herewpunitorintegrationtests.wpunitorintegrationtests.