You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/workos/authorization/_resource.py
+12-7Lines changed: 12 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,6 @@
12
12
AuthorizationCheck,
13
13
AuthorizationPermission,
14
14
AuthorizationResource,
15
-
ListModel,
16
15
Permission,
17
16
Role,
18
17
RoleAssignment,
@@ -328,7 +327,7 @@ def list_organization_roles(
328
327
organization_id: str,
329
328
*,
330
329
request_options: Optional[RequestOptions] =None,
331
-
) ->ListModel:
330
+
) ->RoleList:
332
331
"""List organization roles
333
332
334
333
Get a list of all roles that apply to an organization. This includes both environment roles and organization-specific roles, returned in priority order.
@@ -338,7 +337,7 @@ def list_organization_roles(
338
337
request_options: Per-request options. Supports extra_headers, timeout, max_retries, and base_url override.
339
338
340
339
Returns:
341
-
ListModel
340
+
RoleList
342
341
343
342
Raises:
344
343
AuthorizationError: If the request is forbidden (403).
slug: A unique identifier for the role within the organization. When provided, must begin with 'org-' and contain only lowercase letters, numbers, hyphens, and underscores. When omitted, a slug is auto-generated from the role name and a random suffix.
373
373
name: A descriptive name for the role.
374
374
description: An optional description of the role's purpose.
375
+
resource_type_slug: The slug of the resource type the role is scoped to.
375
376
request_options: Per-request options. Supports extra_headers, timeout, max_retries, and base_url override.
Get a list of all roles that apply to an organization. This includes both environment roles and organization-specific roles, returned in priority order.
slug: A unique identifier for the role within the organization. When provided, must begin with 'org-' and contain only lowercase letters, numbers, hyphens, and underscores. When omitted, a slug is auto-generated from the role name and a random suffix.
1927
1930
name: A descriptive name for the role.
1928
1931
description: An optional description of the role's purpose.
1932
+
resource_type_slug: The slug of the resource type the role is scoped to.
1929
1933
request_options: Per-request options. Supports extra_headers, timeout, max_retries, and base_url override.
Copy file name to clipboardExpand all lines: src/workos/authorization/models/create_organization_role.py
+5Lines changed: 5 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -17,6 +17,8 @@ class CreateOrganizationRole:
17
17
"""A unique identifier for the role within the organization. When provided, must begin with 'org-' and contain only lowercase letters, numbers, hyphens, and underscores. When omitted, a slug is auto-generated from the role name and a random suffix."""
18
18
description: Optional[str] =None
19
19
"""An optional description of the role's purpose."""
20
+
resource_type_slug: Optional[str] =None
21
+
"""The slug of the resource type the role is scoped to."""
0 commit comments