Skip to content

Commit 5ba6eca

Browse files
committed
fix id length
1 parent 5802ae8 commit 5ba6eca

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/connector/server_role.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ func (d *serverRolePrincipalSyncer) Grant(ctx context.Context, resource *v2.Reso
204204

205205
// database-role:baton_test:6:member
206206
splitId := strings.Split(entitlement.Id, ":")
207-
if len(splitId) != 4 {
207+
if len(splitId) != 3 {
208208
return nil, nil, fmt.Errorf("unexpected entitlement id: %s", entitlement.Id)
209209
}
210210

@@ -242,7 +242,7 @@ func (d *serverRolePrincipalSyncer) Revoke(ctx context.Context, grant *v2.Grant)
242242

243243
// database-role:baton_test:6:member
244244
splitId := strings.Split(grant.Entitlement.Id, ":")
245-
if len(splitId) != 4 {
245+
if len(splitId) != 3 {
246246
return nil, fmt.Errorf("unexpected entitlement id: %s", grant.Entitlement.Id)
247247
}
248248

0 commit comments

Comments
 (0)