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

Method GetChatWorkspaceTTL

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

Source from the content-addressed store, hash-verified

3259}
3260
3261func (q *querier) GetChatWorkspaceTTL(ctx context.Context) (string, error) {
3262 // The workspace-TTL setting is a deployment-wide value read by any
3263 // authenticated chat user. We only require that an explicit actor is
3264 // present in the context so unauthenticated calls fail closed.
3265 if _, ok := ActorFromContext(ctx); !ok {
3266 return "", ErrNoActor
3267 }
3268 return q.db.GetChatWorkspaceTTL(ctx)
3269}
3270
3271func (q *querier) GetChats(ctx context.Context, arg database.GetChatsParams) ([]database.GetChatsRow, error) {
3272 prep, err := prepareSQLFilter(ctx, q.auth, policy.ActionRead, rbac.ResourceChat.Type)

Callers

nothing calls this directly

Calls 2

ActorFromContextFunction · 0.70
GetChatWorkspaceTTLMethod · 0.65

Tested by

no test coverage detected