Feat v0.7.6 code hygiene (#60)
All checks were successful
CI/CD / e2e-smoke (push) Has been skipped
CI/CD / detect-changes (push) Successful in 4s
CI/CD / test-runners (push) Has been skipped
CI/CD / test-frontend (push) Successful in 6s
CI/CD / test-go-pg (push) Successful in 2m48s
CI/CD / build-and-deploy (push) Successful in 25s
CI/CD / test-sqlite (push) Successful in 2m55s
All checks were successful
CI/CD / e2e-smoke (push) Has been skipped
CI/CD / detect-changes (push) Successful in 4s
CI/CD / test-runners (push) Has been skipped
CI/CD / test-frontend (push) Successful in 6s
CI/CD / test-go-pg (push) Successful in 2m48s
CI/CD / build-and-deploy (push) Successful in 25s
CI/CD / test-sqlite (push) Successful in 2m55s
Co-authored-by: Jeffrey Smith <jasafpro@gmail.com> Co-committed-by: Jeffrey Smith <jasafpro@gmail.com>
This commit was merged in pull request #60.
This commit is contained in:
@@ -15,8 +15,8 @@
|
||||
// rows = db.view("users", filters={"id": "abc"})
|
||||
//
|
||||
// All table access is scoped to ext_{package_id}_{table_name}.
|
||||
// Platform views (ext_view_users, ext_view_channels) are accessible
|
||||
// via db.view() and are read-only regardless of permission level.
|
||||
// Platform views (ext_view_users) are accessible via db.view()
|
||||
// and are read-only regardless of permission level.
|
||||
//
|
||||
// Queries are parameterized — no raw SQL is ever accepted from scripts.
|
||||
// Dialect differences (placeholder style) are handled internally.
|
||||
@@ -44,8 +44,7 @@ type DBModuleConfig struct {
|
||||
|
||||
// allowedViews is the set of platform views extensions may query via db.view().
|
||||
var allowedViews = map[string]bool{
|
||||
"users": true,
|
||||
"channels": true,
|
||||
"users": true,
|
||||
}
|
||||
|
||||
// BuildDBModule creates the "db" starlark module for an extension.
|
||||
@@ -435,7 +434,7 @@ func dbView(ctx context.Context, cfg DBModuleConfig) func(*starlark.Thread, *sta
|
||||
}
|
||||
|
||||
if !allowedViews[viewName] {
|
||||
return nil, fmt.Errorf("db.view: unknown view %q (allowed: users, channels)", viewName)
|
||||
return nil, fmt.Errorf("db.view: unknown view %q (allowed: users)", viewName)
|
||||
}
|
||||
|
||||
physView := "ext_view_" + viewName
|
||||
|
||||
@@ -61,9 +61,6 @@ type RunContext struct {
|
||||
// UserID is the acting user for provider resolution (BYOK chain).
|
||||
UserID string
|
||||
|
||||
// ChannelID is the context identifier, if any.
|
||||
ChannelID string
|
||||
|
||||
// TeamID is the team context for settings cascade resolution.
|
||||
// When set, team-scoped package settings are included in the cascade.
|
||||
TeamID string
|
||||
|
||||
@@ -187,4 +187,4 @@ func goValToStarlark(v interface{}) starlark.Value {
|
||||
}
|
||||
|
||||
// workflowRoute routes the workflow to a named stage.
|
||||
// Starlark: workflow.route(channel_id, target_stage, reason)
|
||||
// Starlark: workflow.route(instance_id, target_stage, reason)
|
||||
|
||||
Reference in New Issue
Block a user