Skip to content

Commit

Permalink
Added list role assignments in Python SDK
Browse files Browse the repository at this point in the history
  • Loading branch information
danyi1212 committed Jul 3, 2024
1 parent 8280b5e commit 3f1a495
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions docs/sdk/python/usage-example.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,23 @@ ra = await permit.api.users.assign_role(
)
```

### List role assignments

```py
assignments = await permit.api.role_assignments.list(
tenant="tesla",
role="viewer",
)
```

You can also filter for multiple roles:
```py
assignments = await permit.api.role_assignments.list(
tenant="tesla",
role=["viewer", "editor"],
)
```

## Checking Permissions

```py
Expand Down

0 comments on commit 3f1a495

Please sign in to comment.