Skip to content

Commit

Permalink
Bugfix: when use admin account, the SG of other user is queried
Browse files Browse the repository at this point in the history
Signed-off-by: Zhengyi Lai <[email protected]>
  • Loading branch information
zheng1 committed May 31, 2021
1 parent 34f6c3e commit 3fc2708
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/executor/sg.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package executor

import (
"fmt"

"github.com/davecgh/go-spew/spew"
"github.com/yunify/qingcloud-cloud-controller-manager/pkg/apis"
"github.com/yunify/qingcloud-cloud-controller-manager/pkg/errors"
Expand Down Expand Up @@ -143,6 +144,7 @@ func (q *QingCloudClient) ensureSecurityGroupByName(name string) (*apis.Security
func (q *QingCloudClient) GetSecurityGroupByName(name string) (*apis.SecurityGroup, error) {
input := &qcservice.DescribeSecurityGroupsInput{
SearchWord: &name,
Owner: &q.Config.UserID,
}
output, err := q.securityGroupService.DescribeSecurityGroups(input)
if err != nil || *output.RetCode != 0 {
Expand Down

0 comments on commit 3fc2708

Please sign in to comment.