conditional permissions
# spicedb
j
can you expand?
c
@User Sure, so I might have a context with ID
context_1
. Then I have users with IDs
12345
and
98765
. Both should have the
manager
relationship on
context_1
so they have view permissions to all documents with
context_1
as the context, for example
document_1
. However, I would like to check
edit
permissions of a particular user against documents including passing a boolean. If the boolean is true and the user has a manager relationship to the specific document context they should have edit permissions. If the boolean is not true, they won't have edit permissions.
j
so how does the above not solve that?
you just write two relationships and the user will only have edit if the boolean is true
c
Ah, so you are saying I assign both relationships to the user?
j
Yes
c
I think I understand, thanks!