Jaayden Halko
5bdabc95c8
fix(codersdk/licenses.go): read trial claim instead of misspelled trail ( #28014 )
...
## 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.
2026-08-11 10:18:22 +00:00
..
2026-08-06 08:03:47 -07:00
2026-06-26 18:27:37 +02:00
2026-08-05 13:22:23 -07:00
2026-03-10 18:46:01 +00:00
2026-06-01 18:01:19 +03:00
2026-08-06 08:03:47 -07:00
2026-01-08 15:24:11 +04:00
2026-07-28 13:59:37 +02:00
2026-08-05 13:22:23 -07:00
2026-08-05 13:22:23 -07:00
2026-08-05 13:22:23 -07:00
2026-08-04 15:21:23 -04:00
2026-08-04 15:21:23 -04:00
2026-08-05 13:22:23 -07:00
2025-10-23 20:22:51 +03:00
2026-08-05 13:22:23 -07:00
2025-10-09 14:53:08 +02:00
2025-10-09 14:53:08 +02:00
2026-07-07 09:18:30 -07:00
2026-08-05 13:22:23 -07:00
2026-08-05 13:22:23 -07:00
2026-08-05 13:22:23 -07:00
2026-08-04 12:27:38 +02:00
2026-08-06 14:35:37 +10:00
2025-06-24 13:06:02 +02:00
2026-08-06 08:03:47 -07:00
2026-08-06 08:03:47 -07:00
2026-08-05 13:22:23 -07:00
2025-07-30 13:42:39 -07:00
2024-11-15 12:05:21 -06:00
2025-08-29 10:41:32 +02:00
2025-04-15 10:55:30 +02:00
2026-03-13 14:09:39 +00:00
2026-04-01 13:05:14 +00:00
2026-08-05 22:41:17 +02:00
2026-08-05 22:41:17 +02:00
2026-05-19 09:47:03 -05:00
2026-05-19 09:47:03 -05:00
2026-08-05 13:22:23 -07:00
2026-08-05 13:22:23 -07:00
2026-08-05 13:22:23 -07:00
2026-08-10 13:23:14 -07:00
2026-08-05 13:22:23 -07:00
2026-08-05 13:22:23 -07:00
2025-08-19 10:41:33 +02:00
2026-08-05 13:22:23 -07:00
2026-08-11 10:18:22 +00:00
2026-08-05 13:22:23 -07:00
2025-06-20 13:16:55 -06:00
2026-01-09 15:40:26 -07:00
2026-08-05 13:22:23 -07:00
2026-04-10 12:49:22 +03:00
2026-08-05 13:22:23 -07:00
2026-08-06 14:14:37 +10:00
2026-05-22 20:24:38 +10:00
2023-01-13 12:27:21 +01:00
2026-05-21 09:19:29 -06:00
2026-08-05 13:22:23 -07:00
2026-08-05 13:22:23 -07:00
2026-08-05 13:22:23 -07:00
2026-07-07 09:18:30 -07:00
2026-06-05 10:30:31 -05:00
2026-08-05 13:22:23 -07:00
2025-05-29 08:55:19 -05:00
2025-06-20 13:16:55 -06:00
2026-08-05 13:22:23 -07:00
2026-08-05 13:22:23 -07:00
2025-09-26 11:43:32 +02:00
2024-02-14 17:14:49 +00:00
2026-08-05 13:22:23 -07:00
2026-08-06 14:14:37 +10:00
2024-07-24 14:11:29 +10:00
2026-01-08 15:24:11 +04:00
2026-08-05 13:22:23 -07:00
2025-06-20 13:16:55 -06:00
2022-08-25 19:10:42 +03:00
2026-08-05 13:22:23 -07:00
2024-09-10 20:55:50 +10:00
2026-08-05 13:22:23 -07:00
2026-08-05 13:22:23 -07:00
2026-07-28 09:58:33 -06:00
2026-07-28 09:58:33 -06:00
2026-07-28 09:58:33 -06:00
2026-07-28 09:58:33 -06:00
2026-08-05 13:22:23 -07:00
2024-12-19 00:51:30 +04:00
2024-12-19 00:51:30 +04:00
2026-08-05 13:22:23 -07:00
2026-02-06 15:52:54 +00:00
2026-08-10 08:13:32 -05:00
2025-09-10 11:01:54 -05:00
2026-08-05 13:22:23 -07:00
2025-06-20 13:16:55 -06:00
2022-11-08 17:12:06 +00:00
2026-08-05 13:22:23 -07:00
2026-06-26 09:48:05 -07:00
2026-06-08 15:11:36 +01:00
2026-08-10 08:13:32 -05:00
2026-08-05 13:22:23 -07:00