Skip to content

Commit b30fc23

Browse files
feat(api): add resource_ids to role assignments, restructure executable deny list in policies
1 parent 49175f9 commit b30fc23

3 files changed

Lines changed: 18 additions & 6 deletions

File tree

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 175
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-3017822d8c133c3d60f2bf1a65bc81fa8e11737d46d90d2316d5ef57285ed30f.yml
3-
openapi_spec_hash: 2a1219326c8d17de457653ca29023ebf
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-6a3ce4fa1cddca171e56bb663ad37610241027c3e149cdda77d579e1c5f4411a.yml
3+
openapi_spec_hash: fd261ea098c45e8ab600e18bbd9650c5
44
config_hash: b478642d4e5f97aab620afc5c51bb2ea

src/gitpod/types/groups/role_assignment_list_params.py

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
from typing import List
66
from typing_extensions import Annotated, TypedDict
77

8+
from ..._types import SequenceNotStr
89
from ..._utils import PropertyInfo
910
from ..shared.resource_role import ResourceRole
1011
from ..shared.resource_type import ResourceType
@@ -34,11 +35,20 @@ class Filter(TypedDict, total=False):
3435
"""
3536

3637
resource_id: Annotated[str, PropertyInfo(alias="resourceId")]
38+
"""Filters by a single resource.
39+
40+
Use this when listing all groups that have access to a specific resource (e.g.
41+
share dialogs). Non-admin callers with :grant permission on the resource can see
42+
role assignments from groups they don't belong to. Mutually exclusive with
43+
resource_ids.
3744
"""
38-
resource_id filters the response to only role assignments for this specific
39-
resource When provided, users with :grant permission on the resource can see its
40-
role assignments even if they don't belong to the assigned groups Empty string
41-
is allowed and means no filtering by resource
45+
46+
resource_ids: Annotated[SequenceNotStr[str], PropertyInfo(alias="resourceIds")]
47+
"""Filters by multiple resources in a single request.
48+
49+
Use this for batch permission lookups (e.g. checking the caller's own
50+
permissions across several resources). Does not support the :grant permission
51+
bypass. Mutually exclusive with resource_id.
4252
"""
4353

4454
resource_roles: Annotated[List[ResourceRole], PropertyInfo(alias="resourceRoles")]

tests/api_resources/groups/test_role_assignments.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ def test_method_list_with_all_params(self, client: Gitpod) -> None:
7575
filter={
7676
"group_id": "groupId",
7777
"resource_id": "resourceId",
78+
"resource_ids": ["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"],
7879
"resource_roles": ["RESOURCE_ROLE_UNSPECIFIED"],
7980
"resource_types": ["RESOURCE_TYPE_RUNNER"],
8081
"user_id": "userId",
@@ -204,6 +205,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncGitpod) -> N
204205
filter={
205206
"group_id": "groupId",
206207
"resource_id": "resourceId",
208+
"resource_ids": ["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"],
207209
"resource_roles": ["RESOURCE_ROLE_UNSPECIFIED"],
208210
"resource_types": ["RESOURCE_TYPE_RUNNER"],
209211
"user_id": "userId",

0 commit comments

Comments
 (0)