mirror of
https://github.com/coder/coder.git
synced 2025-07-13 21:36:50 +00:00
feat: Add trial property to licenses (#4372)
* feat: Add trial property to licenses This allows the frontend to display whether the user is on a trial license of Coder. This is useful for advertising Enterprise functionality. * Improve tests for license enablement code * Add all features property
This commit is contained in:
@ -10,9 +10,9 @@ import (
|
||||
|
||||
func (api *API) shouldBlockNonBrowserConnections(rw http.ResponseWriter) bool {
|
||||
api.entitlementsMu.Lock()
|
||||
browserOnly := api.entitlements.browserOnly
|
||||
browserOnly := api.entitlements.Features[codersdk.FeatureBrowserOnly].Enabled
|
||||
api.entitlementsMu.Unlock()
|
||||
if api.BrowserOnly && browserOnly != codersdk.EntitlementNotEntitled {
|
||||
if browserOnly {
|
||||
httpapi.Write(context.Background(), rw, http.StatusConflict, codersdk.Response{
|
||||
Message: "Non-browser connections are disabled for your deployment.",
|
||||
})
|
||||
|
Reference in New Issue
Block a user