Skip to content

Commit

Permalink
fix(web/api): fix permissions id (TencentBlueKing#874)
Browse files Browse the repository at this point in the history
  • Loading branch information
Han-Ya-Jun authored and Carlmac committed Sep 10, 2024
1 parent 5beb5be commit 42d1bd9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ def get_app_permissions(self, gateway_queryset, resource_queryset):
"bk_app_code": perm.bk_app_code,
"expires": perm.expires,
"grant_dimension": GrantDimensionEnum.API.value,
"id": perm.id,
}
for perm in gateway_queryset
]
Expand All @@ -104,6 +105,7 @@ def get_app_permissions(self, gateway_queryset, resource_queryset):
"resource_id": perm.resource_id,
"expires": perm.expires,
"grant_dimension": GrantDimensionEnum.RESOURCE.value,
"id": perm.id,
}
for perm in resource_queryset
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ def test_to_representation(self):
"grant_dimension": "api",
"grant_type": "initialize",
"renewable": False,
"id": app_api_permission.id,
},
{
"bk_app_code": "test",
Expand All @@ -133,6 +134,7 @@ def test_to_representation(self):
"grant_dimension": "resource",
"grant_type": "apply",
"renewable": True,
"id": app_resource_permission.id,
},
]

Expand Down

0 comments on commit 42d1bd9

Please sign in to comment.