Skip to content

Commit d58b3f7

Browse files
zhengkunwang223wanghe-fit2cloud
authored andcommitted
fix(secret): 修复部分类型的secret不能编辑的BUG
TAPD https://www.tapd.cn/63634125/bugtrace/bugs/view?bug_id=1163634125001008197 (cherry picked from commit 3021bfa)
1 parent a8ab5f4 commit d58b3f7

File tree

1 file changed

+6
-3
lines changed
  • web/dashboard/src/business/configuration/secrets

1 file changed

+6
-3
lines changed

web/dashboard/src/business/configuration/secrets/index.vue

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@ import {downloadYaml} from "@/utils/actions"
4545
import KoTableOperations from "@/components/ko-table-operations"
4646
import {checkPermissions} from "@/utils/permission"
4747
48+
49+
const types = ['Opaque','kubernetes.io/dockerconfigjson','kubernetes.io/basic-auth','kubernetes.io/ssh-auth','kubernetes.io/tls']
50+
4851
export default {
4952
name: "Secrets",
5053
components: { ComplexTable, LayoutContent, KoTableOperations },
@@ -72,7 +75,7 @@ export default {
7275
apiGroup: "",
7376
resource: "secrets",
7477
verb: "update"
75-
}) || row.type === "kubernetes.io/service-account-token"
78+
}) || types.indexOf(row.type) === -1
7679
}
7780
},
7881
{
@@ -85,13 +88,13 @@ export default {
8588
query: { yamlShow: true }
8689
})
8790
},
88-
disabled: (row) => {
91+
disabled: () => {
8992
return !checkPermissions({
9093
scope: "namespace",
9194
apiGroup: "",
9295
resource: "secrets",
9396
verb: "update"
94-
}) || row.type === "kubernetes.io/service-account-token"
97+
})
9598
}
9699
},
97100
{

0 commit comments

Comments
 (0)