Skip to content

Commit

Permalink
Merge 40c0725 into ca85a17
Browse files Browse the repository at this point in the history
  • Loading branch information
StarAurryon authored Apr 21, 2023
2 parents ca85a17 + 40c0725 commit fc89afc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions persistence/sql/persister_grant_jwk.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ func (p *Persister) GetPublicKey(ctx context.Context, issuer string, subject str
var data trust.SQLData
query := p.QueryWithNetwork(ctx).
Where("issuer = ?", issuer).
Where("subject = ? OR allow_any_subject IS TRUE", subject).
Where("(subject = ? OR allow_any_subject IS TRUE)", subject).
Where("key_id = ?", keyId).
Where("nid = ?", p.NetworkID(ctx))
if err := query.First(&data); err != nil {
Expand All @@ -135,7 +135,7 @@ func (p *Persister) GetPublicKeys(ctx context.Context, issuer string, subject st
grantsData := make([]trust.SQLData, 0)
query := p.QueryWithNetwork(ctx).
Where("issuer = ?", issuer).
Where("subject = ? OR allow_any_subject IS TRUE", subject).
Where("(subject = ? OR allow_any_subject IS TRUE)", subject).
Where("nid = ?", p.NetworkID(ctx))

if err := query.All(&grantsData); err != nil {
Expand Down Expand Up @@ -170,7 +170,7 @@ func (p *Persister) GetPublicKeyScopes(ctx context.Context, issuer string, subje
var data trust.SQLData
query := p.QueryWithNetwork(ctx).
Where("issuer = ?", issuer).
Where("subject = ? OR allow_any_subject IS TRUE", subject).
Where("(subject = ? OR allow_any_subject IS TRUE)", subject).
Where("key_id = ?", keyId).
Where("nid = ?", p.NetworkID(ctx))

Expand Down

0 comments on commit fc89afc

Please sign in to comment.