Skip to content

Commit 153d9ba

Browse files
feat: [backend] Resource admin should be able to see all resource shares
1 parent d1573e5 commit 153d9ba

3 files changed

Lines changed: 12 additions & 2 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: 170
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-4e4b65aac5cad420f0090e1925de4d9c576b7cae6e839120963c94b5b245e335.yml
3-
openapi_spec_hash: ebc6921eaa311aaaff497646f16adf10
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-23f7678921f123913793223b36eb15c9f483ec734e49f2ba25f771dba409e781.yml
3+
openapi_spec_hash: cad5d5f46f759aea198ce46ba9c16aeb
44
config_hash: d726afb2a92132197e4eae04303e8041

src/gitpod/types/groups/role_assignment_list_params.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,14 @@ class Filter(TypedDict, total=False):
3333
Empty string is allowed and means no filtering by group
3434
"""
3535

36+
resource_id: Annotated[str, PropertyInfo(alias="resourceId")]
37+
"""
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
42+
"""
43+
3644
resource_roles: Annotated[List[ResourceRole], PropertyInfo(alias="resourceRoles")]
3745
"""
3846
resource_roles filters the response to only role assignments with these specific

tests/api_resources/groups/test_role_assignments.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ def test_method_list_with_all_params(self, client: Gitpod) -> None:
7474
page_size=0,
7575
filter={
7676
"group_id": "groupId",
77+
"resource_id": "resourceId",
7778
"resource_roles": ["RESOURCE_ROLE_UNSPECIFIED"],
7879
"resource_types": ["RESOURCE_TYPE_RUNNER"],
7980
"user_id": "userId",
@@ -202,6 +203,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncGitpod) -> N
202203
page_size=0,
203204
filter={
204205
"group_id": "groupId",
206+
"resource_id": "resourceId",
205207
"resource_roles": ["RESOURCE_ROLE_UNSPECIFIED"],
206208
"resource_types": ["RESOURCE_TYPE_RUNNER"],
207209
"user_id": "userId",

0 commit comments

Comments
 (0)