zw
08/28/2025, 3:01 PMdefinition user {
relation is_visible: user // self relation
permission is_visible = is_visible
}
definition account {
relation owner: user
permission read = owner->is_visible
}
we're storing zedtoken per object, so there's token t1 for user , and token t2 for the account. Now, user's is_visible is removed, so there's a new token t3 stored for user. If we check read permission on the account after, the token stored is still t2 (before user update), would the check permission result use the cache and not necessarily reflect the update in user relation? In other words, could the read permission check on the account at this point actually still return true?pepegar
08/28/2025, 3:35 PMyetitwo
08/28/2025, 4:21 PMzw
08/28/2025, 4:55 PMpermission read = is_account_visible -> (owner->is_visible)zw
08/28/2025, 4:59 PMyetitwo
08/28/2025, 5:34 PMyetitwo
08/28/2025, 5:35 PMyetitwo
08/28/2025, 5:36 PMLookupResources should really only give the user information about the existence of a thing, but reading the contents of the resource itself should involve checking the user's permission using the zedtoken associated with that documentyetitwo
08/28/2025, 5:37 PMLookupResources that returns the document shouldn't give them any information about the contents of the document - they'd have to attempt to read the document directly, and then get access denied, and they don't have any new information about the contents of the documentyetitwo
08/28/2025, 5:38 PMzw
08/28/2025, 5:38 PMyetitwo
08/28/2025, 5:42 PMyetitwo
08/28/2025, 5:42 PMzw
08/28/2025, 5:51 PMzw
08/28/2025, 6:34 PMyetitwo
08/28/2025, 6:34 PMyetitwo
08/28/2025, 6:34 PMyetitwo
08/28/2025, 6:36 PMmin_latency requests, not something that i would lean on for correctness of business logiczw
08/28/2025, 6:36 PM