Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix(codersdk/licenses.go): read trial claim instead of misspelled trail - #28014

Merged
jaaydenh merged 1 commit into
mainfrom
fix-license-trial-claim-typo
Aug 11, 2026
Merged

fix(codersdk/licenses.go): read trial claim instead of misspelled trail#28014
jaaydenh merged 1 commit into
mainfrom
fix-license-trial-claim-typo

Conversation

@jaaydenh

Copy link
Copy Markdown
Contributor

What this fixes

codersdk.License.Trial() looked up the JWT claim "trail" (a typo) instead of "trial", the actual claim name set by license issuance (enterprise/coderd/license/license.go). Since no license contains a "trail" claim, the method always returned false.

The only consumer is coder licenses list (via cli/cliutil/license.go), so the CLI never reported a license as a trial even when it was one. The web UI is unaffected because it reads claims.trial directly.

Changes

  • Read the "trial" claim in License.Trial().

Testing

  • go build / go vet on codersdk and cli/cliutil.
  • go test -run 'TestLicensesListFake|TestLicensesListReal' ./enterprise/cli passes.

@jaaydenh
jaaydenh marked this pull request as ready for review August 11, 2026 10:07
@jaaydenh
jaaydenh enabled auto-merge (squash) August 11, 2026 10:09
@DanielleMaywood

Copy link
Copy Markdown
Contributor

No test?

@jaaydenh
jaaydenh merged commit 5bdabc9 into main Aug 11, 2026
55 of 56 checks passed
@jaaydenh
jaaydenh deleted the fix-license-trial-claim-typo branch August 11, 2026 10:18
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 11, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants