mirror of
https://github.com/casdoor/casdoor.git
synced 2025-05-23 10:45:47 +08:00
Add isHashed to syncer's tableColumn.
This commit is contained in:
parent
5ee5299a68
commit
bf642b35d4
@ -25,6 +25,7 @@ type TableColumn struct {
|
|||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
Type string `json:"type"`
|
Type string `json:"type"`
|
||||||
CasdoorName string `json:"casdoorName"`
|
CasdoorName string `json:"casdoorName"`
|
||||||
|
IsHashed bool `json:"isHashed"`
|
||||||
Values []string `json:"values"`
|
Values []string `json:"values"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -80,7 +80,9 @@ func (syncer *Syncer) calculateHash(user *OriginalUser) string {
|
|||||||
values := []string{}
|
values := []string{}
|
||||||
m := syncer.getMapFromOriginalUser(user)
|
m := syncer.getMapFromOriginalUser(user)
|
||||||
for _, tableColumn := range syncer.TableColumns {
|
for _, tableColumn := range syncer.TableColumns {
|
||||||
values = append(values, m[tableColumn.Name])
|
if tableColumn.IsHashed {
|
||||||
|
values = append(values, m[tableColumn.CasdoorName])
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
s := strings.Join(values, "|")
|
s := strings.Join(values, "|")
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import {DownOutlined, DeleteOutlined, UpOutlined} from '@ant-design/icons';
|
import {DownOutlined, DeleteOutlined, UpOutlined} from '@ant-design/icons';
|
||||||
import {Button, Col, Input, Row, Select, Table, Tooltip} from 'antd';
|
import {Button, Col, Input, Row, Select, Switch, Table, Tooltip} from 'antd';
|
||||||
import * as Setting from "./Setting";
|
import * as Setting from "./Setting";
|
||||||
import i18next from "i18next";
|
import i18next from "i18next";
|
||||||
|
|
||||||
@ -107,6 +107,18 @@ class SyncerTableColumnTable extends React.Component {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: i18next.t("syncer:Is hashed"),
|
||||||
|
dataIndex: 'isHashed',
|
||||||
|
key: 'isHashed',
|
||||||
|
render: (text, record, index) => {
|
||||||
|
return (
|
||||||
|
<Switch checked={text} onChange={checked => {
|
||||||
|
this.updateField(table, index, 'isHashed', checked);
|
||||||
|
}} />
|
||||||
|
)
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("general:Action"),
|
title: i18next.t("general:Action"),
|
||||||
key: 'action',
|
key: 'action',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user