Ben Simpson
04/11/2024, 12:04 AMLookupSubjects
seems to be returning duplicate results, this is just running tests against the memory
datastore so not sure if it's datastore-specific. Is this known and/or expected in 1.29.2
?
❯ zed relationship create auth/organisation:123 admin auth/staff:abc#user
11:51AM WRN the version of SpiceDB being called is out of date. See: https://github.com/authzed/spicedb/releases/tag/v1.30.1 latest-released-version=v1.30.1 this-version=v1.29.2
GhUKEzE3MTI3OTMwNzM3NTUzNjg3MDY=
❯ zed permission lookup-subjects auth/organisation:123 admin auth/staff#user
auth/staff:abc
auth/staff:abc
❯ zed relationship read auth/organisation:123 admin auth/staff:abc#user
auth/organisation:123 admin auth/staff:abc#user
Ben Simpson
04/11/2024, 12:11 AMBen Simpson
04/11/2024, 12:12 AMrelation admin: staff#user
Ben Simpson
04/11/2024, 12:13 AMBen Simpson
04/11/2024, 12:14 AMJoey
04/11/2024, 1:03 AMJoey
04/11/2024, 1:03 AMBen Simpson
04/11/2024, 1:06 AMReadRelationships
for my test, just trying to wrap my head around why this happensJoey
04/11/2024, 1:06 AMBen Simpson
04/11/2024, 1:33 AM❯ zed schema read
definition auth/organisation {
relation admin: auth/staff#user
}
definition auth/staff {
relation user: auth/user
}
definition auth/user {}
❯ zed relationship create auth/organisation:123 admin auth/staff:abc#user
GhUKEzE3MTI3OTkwMzk2MDIzMjA3MTg=
❯ zed permission lookup-subjects auth/organisation:123 admin auth/staff#user
auth/staff:abc
auth/staff:abc
Joey
04/11/2024, 1:36 AMJoey
04/11/2024, 1:36 AMBen Simpson
04/11/2024, 1:36 AMJoey
04/11/2024, 1:37 AMJoey
04/11/2024, 1:37 AMBen Simpson
04/11/2024, 1:40 AMuser
relation to staff:123
and lookup the user
subjects instead. I was specifically trying to test for the relation being created without caring about whatever else existed - in hindsight ReadRelationships
is a better choice for this anyway