Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-jcieslak committed Mar 27, 2024
1 parent 632d3db commit 268b066
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/resources/grant_ownership_acceptance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -721,7 +721,7 @@ func TestAcc_GrantOwnership_OnPipe(t *testing.T) {
Name: sdk.NewSchemaObjectIdentifierFromFullyQualifiedName(pipeFullyQualifiedName),
},
},
// TODO: Fix this identifier
// TODO(): Fix this identifier
}, sdk.ObjectTypePipe, accountRoleName, fmt.Sprintf("%s\".\"%s\".%s", acc.TestDatabaseName, acc.TestSchemaName, pipeName)),
),
},
Expand Down
2 changes: 1 addition & 1 deletion pkg/sdk/grants_impl.go
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ func (v *grants) grantOwnershipOnPipe(ctx context.Context, pipeId SchemaObjectId
}

canOperateOnPipe := slices.ContainsFunc(currentGrants, func(grant Grant) bool {
return grant.Privilege == "OWNERSHIP" || grant.Privilege == SchemaObjectPrivilegeOperate.String() && grant.GranteeName == currentRoleName
return grant.GranteeName == currentRoleName && (grant.Privilege == "OWNERSHIP" || grant.Privilege == SchemaObjectPrivilegeOperate.String())
})

var revokeOperate func() error
Expand Down

0 comments on commit 268b066

Please sign in to comment.