Skip to content
This repository has been archived by the owner on Apr 25, 2023. It is now read-only.

Commit

Permalink
Fix GetAuthorizedTargets Action column
Browse files Browse the repository at this point in the history
  • Loading branch information
luojielin committed Mar 5, 2022
1 parent ed47b2e commit 960c610
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions lib/management/acl_management_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -567,9 +567,9 @@ func (c *Client) UpdateDefaultApplicationAccessPolicy(appId string, strategy con
func (c *Client) GetAuthorizedTargets(req *model.GetAuthorizedTargetsRequest) (*struct {
TotalCount int64 `json:"totalCount"`
List []struct {
Actions string `json:"actions"`
TargetType string `json:"targetType"`
TargetIdentifier string `json:"targetIdentifier"`
Actions []string `json:"actions"`
TargetType string `json:"targetType"`
TargetIdentifier string `json:"targetIdentifier"`
} `json:"list"`
}, error) {
data, _ := json.Marshal(&req)
Expand All @@ -584,9 +584,9 @@ func (c *Client) GetAuthorizedTargets(req *model.GetAuthorizedTargetsRequest) (*
AuthorizedTargets struct {
TotalCount int64 `json:"totalCount"`
List []struct {
Actions string `json:"actions"`
TargetType string `json:"targetType"`
TargetIdentifier string `json:"targetIdentifier"`
Actions []string `json:"actions"`
TargetType string `json:"targetType"`
TargetIdentifier string `json:"targetIdentifier"`
} `json:"list"`
} `json:"authorizedTargets"`
} `json:"data"`
Expand Down
4 changes: 2 additions & 2 deletions lib/management/acl_management_client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -286,8 +286,8 @@ func TestClient_GetAuthorizedTargets(t *testing.T) {
log.Println("==========获取拥有资源的对象列表==========")

req := &model.GetAuthorizedTargetsRequest{
TargetType: constant.ROLE,
Resource: "cccccc",
TargetType: constant.GROUP,
Resource: "open",
Namespace: "default",
ResourceType: model.EnumResourceTypeAPI,
}
Expand Down

0 comments on commit 960c610

Please sign in to comment.