-
Notifications
You must be signed in to change notification settings - Fork 162
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ListUsers API #1433
ListUsers API #1433
Conversation
Lets not look too much into the argument name. We're just using an established convention to specify type and optional relation, why would we create a whole new system for this? It's only to facilitate our integration testing too. |
This reverts commit 25c237f.
Description
Introducing the
ListUsers
API which answers the question "what users are related to a specific object?". To learn more about this feature, refer to the ListUsers RFC.A ListUsers request is composed of three main properties:
user_filter
– the type of user (subject) targeted for the response. This can either be a terminal type (e.g.user
) or a userset (e.g.group#member
). Only one user filter can be provided at this time.relation
– the target relation that subjects need to the specified objectobject
– the target resource that subjects need to be related toExample:
Consider this model and tuples:
If we want to return all subjects of type
user
that have theviewer
relation ondocument:1
we would callListUsers(user_filter=user, viewer, document:1)
which would return the following:Note: This API will initially be released in an experimental capacity. It can be enabled by setting
OPENFGA_EXPERIMENTALS=enable-list-users
References
Review Checklist
main