mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08: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:
@@ -21,10 +21,10 @@ import (
|
||||
func (api *API) scimEnabledMW(next http.Handler) http.Handler {
|
||||
return http.HandlerFunc(func(rw http.ResponseWriter, r *http.Request) {
|
||||
api.entitlementsMu.RLock()
|
||||
scim := api.entitlements.scim
|
||||
scim := api.entitlements.Features[codersdk.FeatureSCIM].Enabled
|
||||
api.entitlementsMu.RUnlock()
|
||||
|
||||
if scim == codersdk.EntitlementNotEntitled {
|
||||
if !scim {
|
||||
httpapi.RouteNotFound(rw)
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user