Skip to content

Commit

Permalink
Merge pull request #522 from sangkenlee/permitted-org-fix
Browse files Browse the repository at this point in the history
Permitted Org가 할당 안 된 경우 전체 조직이 Permitted Org에 표시되는 버그 수정
  • Loading branch information
ktkfree authored Jun 19, 2024
2 parents 80f4c71 + 8e117fc commit 7faca3f
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions internal/usecase/policy-template.go
Original file line number Diff line number Diff line change
Expand Up @@ -308,16 +308,6 @@ func (u *PolicyTemplateUsecase) Get(ctx context.Context, organizationId *string,
"PT_NOT_FOUND_POLICY_TEMPLATE", "")
}

if policyTemplate.IsTksTemplate() && len(policyTemplate.PermittedOrganizations) == 0 {
organizations, err := u.organizationRepo.Fetch(ctx, nil)

if err != nil {
log.Errorf(ctx, "error is :%s(%T)", err.Error(), err)
} else if organizations != nil {
policyTemplate.PermittedOrganizations = *organizations
}
}

if organizationId != nil {
(*policyTemplate).LatestVersion = policyTemplate.Version

Expand Down

0 comments on commit 7faca3f

Please sign in to comment.