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

Method GetChatDesktopEnabled

coderd/database/dbauthz/dbauthz.go:2942–2951  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

2940}
2941
2942func (q *querier) GetChatDesktopEnabled(ctx context.Context) (bool, error) {
2943 // The desktop-enabled flag is a deployment-wide setting read by any
2944 // authenticated chat user and by chatd when deciding whether to expose
2945 // computer-use tooling. We only require that an explicit actor is present
2946 // in the context so unauthenticated calls fail closed.
2947 if _, ok := ActorFromContext(ctx); !ok {
2948 return false, ErrNoActor
2949 }
2950 return q.db.GetChatDesktopEnabled(ctx)
2951}
2952
2953func (q *querier) GetChatDiffStatusByChatID(ctx context.Context, chatID uuid.UUID) (database.ChatDiffStatus, error) {
2954 // Authorize read on the parent chat.

Callers

nothing calls this directly

Calls 2

ActorFromContextFunction · 0.70
GetChatDesktopEnabledMethod · 0.65

Tested by

no test coverage detected