feat: en/decodeURI in permission/role name (#2137)

This commit is contained in:
June
2023-07-26 12:08:35 +07:00
committed by GitHub
parent 55d5ae10f2
commit b5e9084e5d
8 changed files with 14 additions and 14 deletions

View File

@ -121,7 +121,7 @@ class RoleListPage extends BaseListPage {
...this.getColumnSearchProps("name"),
render: (text, record, index) => {
return (
<Link to={`/roles/${record.owner}/${record.name}`}>
<Link to={`/roles/${record.owner}/${encodeURIComponent(record.name)}`}>
{text}
</Link>
);
@ -213,7 +213,7 @@ class RoleListPage extends BaseListPage {
render: (text, record, index) => {
return (
<div>
<Button style={{marginTop: "10px", marginBottom: "10px", marginRight: "10px"}} type="primary" onClick={() => this.props.history.push(`/roles/${record.owner}/${record.name}`)}>{i18next.t("general:Edit")}</Button>
<Button style={{marginTop: "10px", marginBottom: "10px", marginRight: "10px"}} type="primary" onClick={() => this.props.history.push(`/roles/${record.owner}/${encodeURIComponent(record.name)}`)}>{i18next.t("general:Edit")}</Button>
<PopconfirmModal
title={i18next.t("general:Sure to delete") + `: ${record.name} ?`}
onConfirm={() => this.deleteRole(index)}