mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
fix: Panic when loading coordination override (#4152)
This was broken because of browser-only. This should fix it! Signed-off-by: Kyle Carberry <kyle@carberry.com> Signed-off-by: Kyle Carberry <kyle@carberry.com>
This commit is contained in:
@@ -405,8 +405,11 @@ func (api *API) workspaceAgentClientCoordinate(rw http.ResponseWriter, r *http.R
|
||||
}
|
||||
// This is used by Enterprise code to control the functionality of this route.
|
||||
override := api.WorkspaceClientCoordinateOverride.Load()
|
||||
if override != nil && (*override)(rw) {
|
||||
return
|
||||
if override != nil {
|
||||
overrideFunc := *override
|
||||
if overrideFunc != nil && overrideFunc(rw) {
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
api.websocketWaitMutex.Lock()
|
||||
|
||||
@@ -43,7 +43,9 @@ func New(ctx context.Context, options *Options) (*API, error) {
|
||||
Entitlement: codersdk.EntitlementNotEntitled,
|
||||
Enabled: false,
|
||||
},
|
||||
auditLogs: codersdk.EntitlementNotEntitled,
|
||||
auditLogs: codersdk.EntitlementNotEntitled,
|
||||
browserOnly: codersdk.EntitlementNotEntitled,
|
||||
scim: codersdk.EntitlementNotEntitled,
|
||||
},
|
||||
cancelEntitlementsLoop: cancelFunc,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user