You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
schema: >- definition user {} /** * The count of current entries in the database must be lower than the limit. */ caveat write_limit(limit uint, count uint) { count < limit } definition role { relation member: user } definition database { relation writer: role#member with write_limit permission write = writer }relationships: |- database:listings#writer@role:default#member[write_limit:{"limit":2}] database:listings#writer@role:premium#member[write_limit:{"limit":4}] role:default#member@user:bob role:premium#member@user:bobassertions:
assertTrue:
- 'database:listings#write@user:bob with {"count":3}'validation: {}
I expected the permission check to succeed, which is the case when running Spicedb with the in-memory database or using zed validate ./schema.yaml.
Actual Result
The permission check fails when using Postgres, MySql or the zed terminal on the Authzed playground.
However, if I switch the values for the limit parameter and have relationships like
the permission check succeeds.
For me, it looks like Spicedb stops evaluation after encountering the first caveat relationship and ignores any further relationships.
The text was updated successfully, but these errors were encountered:
@tim-mod Its not a datastore issue but rather something in the redispatcher logic. I've identified the issue and we'll issue a fix (and a point release) over the next few days
What platforms are affected?
linux
What architectures are affected?
amd64
What SpiceDB version are you using?
v1.35.2
Steps to Reproduce
docker-compose.yaml
schema.yaml
Run
docker compose -f ./docker-compose.yaml up
zed import ./schema.yaml
zed permission check database:listings write user:bob --caveat-context '{"count":3}' --consistency-full
Expected Result
I expected the permission check to succeed, which is the case when running Spicedb with the in-memory database or using
zed validate ./schema.yaml
.Actual Result
The permission check fails when using Postgres, MySql or the zed terminal on the Authzed playground.
However, if I switch the values for the
limit
parameter and have relationships likeinstead of
the permission check succeeds.
For me, it looks like Spicedb stops evaluation after encountering the first caveat relationship and ignores any further relationships.
The text was updated successfully, but these errors were encountered: