feat: support RBAC with domains model and add adapter to specify the table name for policy storage (#1020)

* feat: support RBAC with domains model and add adapter to specify the table name for policy storage

Signed-off-by: Yixiang Zhao <seriouszyx@foxmail.com>

* fix some bugs

Signed-off-by: Yixiang Zhao <seriouszyx@foxmail.com>

* add i18n

Signed-off-by: Yixiang Zhao <seriouszyx@foxmail.com>

Signed-off-by: Yixiang Zhao <seriouszyx@foxmail.com>
This commit is contained in:
Yixiang Zhao
2022-08-18 11:49:32 +08:00
committed by GitHub
parent a341c65bb1
commit 8e9ed1205b
11 changed files with 133 additions and 73 deletions

View File

@ -187,6 +187,16 @@ class PermissionEditPage extends React.Component {
</Select>
</Col>
</Row>
<Row style={{marginTop: "20px"}} >
<Col style={{marginTop: "5px"}} span={(Setting.isMobile()) ? 22 : 2}>
{Setting.getLabel(i18next.t("general:Adapter"), i18next.t("general:Adapter - Tooltip"))} :
</Col>
<Col span={22} >
<Input value={this.state.permission.adapter} onChange={e => {
this.updatePermissionField("adapter", e.target.value);
}} />
</Col>
</Row>
<Row style={{marginTop: "20px"}} >
<Col style={{marginTop: "5px"}} span={(Setting.isMobile()) ? 22 : 2}>
{Setting.getLabel(i18next.t("role:Sub users"), i18next.t("role:Sub users - Tooltip"))} :
@ -217,7 +227,7 @@ class PermissionEditPage extends React.Component {
</Col>
<Col span={22} >
<Select virtual={false} mode="tags" style={{width: "100%"}} value={this.state.permission.domains} onChange={(value => {
this.updateRoleField("domains", value);
this.updatePermissionField("domains", value);
})}>
{
this.state.permission.domains.map((domain, index) => <Option key={index} value={domain}>{domain}</Option>)

View File

@ -98,6 +98,8 @@
},
"general": {
"Action": "Aktion",
"Adapter": "Adapter",
"Adapter - Tooltip": "Adapter - Tooltip",
"Add": "Neu",
"Affiliation URL": "Affiliation-URL",
"Affiliation URL - Tooltip": "Unique string-style identifier",

View File

@ -98,6 +98,8 @@
},
"general": {
"Action": "Action",
"Adapter": "Adapter",
"Adapter - Tooltip": "Adapter - Tooltip",
"Add": "Add",
"Affiliation URL": "Affiliation URL",
"Affiliation URL - Tooltip": "Affiliation URL - Tooltip",

View File

@ -98,6 +98,8 @@
},
"general": {
"Action": "Action",
"Adapter": "Adapter",
"Adapter - Tooltip": "Adapter - Tooltip",
"Add": "Ajouter",
"Affiliation URL": "URL d'affiliation",
"Affiliation URL - Tooltip": "Unique string-style identifier",

View File

@ -98,6 +98,8 @@
},
"general": {
"Action": "アクション",
"Adapter": "Adapter",
"Adapter - Tooltip": "Adapter - Tooltip",
"Add": "追加",
"Affiliation URL": "アフィリエイトURL",
"Affiliation URL - Tooltip": "Unique string-style identifier",

View File

@ -98,6 +98,8 @@
},
"general": {
"Action": "Action",
"Adapter": "Adapter",
"Adapter - Tooltip": "Adapter - Tooltip",
"Add": "Add",
"Affiliation URL": "Affiliation URL",
"Affiliation URL - Tooltip": "Unique string-style identifier",

View File

@ -98,6 +98,8 @@
},
"general": {
"Action": "Действие",
"Adapter": "Adapter",
"Adapter - Tooltip": "Adapter - Tooltip",
"Add": "Добавить",
"Affiliation URL": "URL-адрес партнёра",
"Affiliation URL - Tooltip": "Unique string-style identifier",

View File

@ -98,6 +98,8 @@
},
"general": {
"Action": "操作",
"Adapter": "适配器",
"Adapter - Tooltip": "策略存储的表名",
"Add": "添加",
"Affiliation URL": "工作单位URL",
"Affiliation URL - Tooltip": "工作单位URL",