(ctx context.Context)
| 3199 | } |
| 3200 | |
| 3201 | func (q *querier) GetChatSystemPromptConfig(ctx context.Context) (database.GetChatSystemPromptConfigRow, error) { |
| 3202 | // The system prompt configuration is a deployment-wide setting read during |
| 3203 | // chat creation by every authenticated user, so no RBAC policy check is |
| 3204 | // needed. We still verify that a valid actor exists in the context to |
| 3205 | // ensure this is never callable by an unauthenticated or system-internal |
| 3206 | // path without an explicit actor. |
| 3207 | if _, ok := ActorFromContext(ctx); !ok { |
| 3208 | return database.GetChatSystemPromptConfigRow{}, ErrNoActor |
| 3209 | } |
| 3210 | return q.db.GetChatSystemPromptConfig(ctx) |
| 3211 | } |
| 3212 | |
| 3213 | // GetChatTemplateAllowlist requires deployment-config read permission, |
| 3214 | // unlike the peer getters (GetChatDesktopEnabled, etc.) which only |
nothing calls this directly
no test coverage detected