Is it possible to return caveats or metadata with a check #1806
-
Hello. There are millions of orders; for performance, we need the Would like to model it like a caveat but within information return somehow Is there any guidance on how a use case like this should be modelled? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
If I understand correctly, you must return all orders a user can access with A bit unorthodox but you could add a caveat to the relation that grants the permission, you need to place it strategically in a relation that will result in caveating the Order for the user. This is probably one of those instances where the caveat in the permission could be useful. If you have multiple ways an order is owned, it may get trickier because you have to caveat all the relations through which the user can get access to an
Then when running |
Beta Was this translation helpful? Give feedback.
If I understand correctly, you must return all orders a user can access with
resource_id
that starts witha
.You can do
LookupResources
, iterate over the cursor, and drop anyresource_id
that does not start witha
.A bit unorthodox but you could add a caveat to the relation that grants the permission, you need to place it strategically in a relation that will result in caveating the Order for the user. This is probably one of those instances where the caveat in the permission could be useful. If you have multiple ways an order is owned, it may get trickier because you have to caveat all the relations through which the user can get access to an
Order
, depending on your model it may be feas…