Skip to content

Commit ccdfa96

Browse files
authored
fix(core): resolve 'built-in' typos (#2548)
### Proposed Changes * ### Checklist - [ ] I have added or updated unit tests - [ ] I have added or updated integration tests (if appropriate) - [ ] I have added or updated documentation ### Testing Instructions
1 parent cc169d9 commit ccdfa96

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

.github/workflows/checks.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ jobs:
156156
- run: test/service-start.bats
157157
- run: test/tdf-roundtrips.bats
158158
- run: test/policy-service.bats
159-
- name: verify bultin casbin policy
159+
- name: verify builtin casbin policy
160160
run: test/builtin-casbin.bats
161161
- name: create roundtrip test data and run tests
162162
run: go test ./service/rttests -v

service/internal/auth/casbin.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ func NewCasbinEnforcer(c CasbinConfig, logger *logger.Logger) (*Enforcer, error)
5454

5555
isDefaultPolicy := false
5656
if c.Csv == "" {
57-
// Set the Bultin Policy if provided
57+
// Set the Builtin Policy if provided
5858
if c.Builtin != "" {
5959
c.Csv = c.Builtin
6060
} else {

service/pkg/server/options.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ type StartConfig struct {
1515
WaitForShutdownSignal bool
1616
PublicRoutes []string
1717
IPCReauthRoutes []string
18-
bultinPolicyOverride string
18+
builtinPolicyOverride string
1919
extraCoreServices []serviceregistry.IService
2020
extraServices []serviceregistry.IService
2121
casbinAdapter persist.Adapter
@@ -85,7 +85,7 @@ func WithIPCReauthRoutes(routes []string) StartOptions {
8585
// }, "\n")),
8686
func WithBuiltinAuthZPolicy(policy string) StartOptions {
8787
return func(c StartConfig) StartConfig {
88-
c.bultinPolicyOverride = policy
88+
c.builtinPolicyOverride = policy
8989
return c
9090
}
9191
}

service/pkg/server/start.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,8 @@ func Start(f ...StartOptions) error {
113113
}
114114

115115
// Set Default Policy
116-
if startConfig.bultinPolicyOverride != "" {
117-
cfg.Server.Auth.Policy.Builtin = startConfig.bultinPolicyOverride
116+
if startConfig.builtinPolicyOverride != "" {
117+
cfg.Server.Auth.Policy.Builtin = startConfig.builtinPolicyOverride
118118
}
119119

120120
// Set Casbin Adapter

0 commit comments

Comments
 (0)