Is there any way to request the list of permission...
# spicedb
l
Is there any way to request the list of permissions that a subject has?
Copy code
definition user {}

definition document {
    relation writer: user
    relation reader: user

    /**
     * edit determines whether a user can edit the document
     */
    permission edit = writer

    /**
     * view determines whether a user can view the document
     */
    permission view = reader + writer
}
For example, using the above schema, I'd want to be able to query for information like the following:
user:id [document.edit, document.view]
. I'm intending to use this information to control component visibility. Any thoughts or suggestions of other directions to go in?
4 Views