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

Method GetChatTemplateAllowlist

coderd/database/dbauthz/dbauthz.go:3217–3222  ·  view source on GitHub ↗

GetChatTemplateAllowlist requires deployment-config read permission, unlike the peer getters (GetChatDesktopEnabled, etc.) which only check actor presence. The allowlist is admin-configuration that should not be readable by non-admin users via the HTTP API.

(ctx context.Context)

Source from the content-addressed store, hash-verified

3215// check actor presence. The allowlist is admin-configuration that
3216// should not be readable by non-admin users via the HTTP API.
3217func (q *querier) GetChatTemplateAllowlist(ctx context.Context) (string, error) {
3218 if err := q.authorizeContext(ctx, policy.ActionRead, rbac.ResourceDeploymentConfig); err != nil {
3219 return "", err
3220 }
3221 return q.db.GetChatTemplateAllowlist(ctx)
3222}
3223
3224func (q *querier) GetChatTitleGenerationModelOverride(ctx context.Context) (string, error) {
3225 if err := q.authorizeContext(ctx, policy.ActionRead, rbac.ResourceDeploymentConfig); err != nil {

Callers

nothing calls this directly

Calls 2

authorizeContextMethod · 0.95

Tested by

no test coverage detected