We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5cfd9c1 commit 8905252Copy full SHA for 8905252
1 file changed
example/example1/example1.py
@@ -16,6 +16,7 @@
16
TypeDefinition,
17
Userset,
18
Usersets,
19
+ UserTypeFilter,
20
WriteAuthorizationModelRequest,
21
)
22
from openfga_sdk.client.models import (
@@ -306,16 +307,17 @@ async def main():
306
307
# ListUsers
308
print("Listing user who have access to object")
309
- response = await fga_client.list_objects(
310
+ response = await fga_client.list_users(
311
ClientListUsersRequest(
312
relation="viewer",
313
object=FgaObject(type="document", id="roadmap"),
314
user_filters=[
- FgaObject(type="user"),
315
+ UserTypeFilter(type="user"),
316
],
317
+ context=dict(ViewCount=100),
318
319
- print(f"Users: {response.objects}")
320
+ print(f"Users: {response.users}")
321
322
# WriteAssertions
323
await fga_client.write_assertions(
0 commit comments