MCPcopy Index your code
hub / github.com/coder/coder / allowChatSharing

Method allowChatSharing

coderd/exp_chats_acl.go:276–284  ·  view source on GitHub ↗
(ctx context.Context, rw http.ResponseWriter)

Source from the content-addressed store, hash-verified

274}
275
276func (api *API) allowChatSharing(ctx context.Context, rw http.ResponseWriter) bool {
277 if !api.chatSharingDisabled() {
278 return true
279 }
280 httpapi.Write(ctx, rw, http.StatusForbidden, codersdk.Response{
281 Message: "Chat sharing is disabled for this deployment.",
282 })
283 return false
284}
285
286func (api *API) chatSharingDisabled() bool {
287 return rbac.ChatACLDisabled() || (api.DeploymentValues != nil && bool(api.DeploymentValues.DisableChatSharing))

Callers 2

getChatACLMethod · 0.95
patchChatACLMethod · 0.95

Calls 2

chatSharingDisabledMethod · 0.95
WriteFunction · 0.92

Tested by

no test coverage detected