Skip to content

feat: add licenses.validate endpoint to preview a license before applying#40858

Draft
rodrigok wants to merge 2 commits into
developfrom
worktree-majestic-wibbling-jellyfish
Draft

feat: add licenses.validate endpoint to preview a license before applying#40858
rodrigok wants to merge 2 commits into
developfrom
worktree-majestic-wibbling-jellyfish

Conversation

@rodrigok

@rodrigok rodrigok commented Jun 9, 2026

Copy link
Copy Markdown
Member

Adds a new POST /api/v1/licenses.validate REST endpoint that validates a Rocket.Chat license (V2 or V3 JWT) against the current workspace's validation structure without applying it, so the result can be previewed from the UI before the license is committed.

  • core-typings: new LicenseValidationResult type
  • license: LicenseManager.validateLicenseForPreview() runs the same validation pipeline used on apply (URL, periods, limits) without mutating state or emitting events; the shared licenseValidationBehaviors constant is reused by both the apply and preview paths to avoid duplication
  • rest-typings: isLicensesValidateProps schema + endpoint typing
  • meteor: licenses.validate route (edit-privileged-setting)

Proposed changes (including videos or screenshots)

Issue(s)

Steps to test or reproduce

Further comments

CORE-2104

…ying

Adds a new `POST /api/v1/licenses.validate` REST endpoint that validates a
Rocket.Chat license (V2 or V3 JWT) against the current workspace's validation
structure without applying it, so the result can be previewed from the UI
before the license is committed.

- core-typings: new `LicenseValidationResult` type
- license: `LicenseManager.validateLicenseForPreview()` runs the same
  validation pipeline used on apply (URL, periods, limits) without mutating
  state or emitting events; the shared `licenseValidationBehaviors` constant
  is reused by both the apply and preview paths to avoid duplication
- rest-typings: `isLicensesValidateProps` schema + endpoint typing
- meteor: `licenses.validate` route (edit-privileged-setting)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@dionisio-bot

dionisio-bot Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Looks like this PR is not ready to merge, because of the following issues:

  • This PR is missing the 'stat: QA assured' label

Please fix the issues and try again

If you have any trouble, please check the PR guidelines

@coderabbitai

coderabbitai Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: c1c3b6ee-c687-42c1-81ac-dea18b6d49c0

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@changeset-bot

changeset-bot Bot commented Jun 9, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 93bc1b7

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 4 packages
Name Type
@rocket.chat/core-typings Minor
@rocket.chat/license Minor
@rocket.chat/rest-typings Minor
@rocket.chat/meteor Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@codecov

codecov Bot commented Jun 9, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 80.00000% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 70.17%. Comparing base (021f169) to head (93bc1b7).
⚠️ Report is 16 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #40858      +/-   ##
===========================================
- Coverage    70.17%   70.17%   -0.01%     
===========================================
  Files         3341     3341              
  Lines       123645   123572      -73     
  Branches     22050    22412     +362     
===========================================
- Hits         86765    86711      -54     
+ Misses       33539    33504      -35     
- Partials      3341     3357      +16     
Flag Coverage Δ
e2e 59.38% <ø> (-0.05%) ⬇️
e2e-api 46.70% <ø> (+0.41%) ⬆️
unit 70.96% <80.00%> (-0.04%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@dougfabris dougfabris added this to the 8.6.0 milestone Jun 10, 2026
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.

2 participants