mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-15 03:43:51 +08:00
Add user to Resource.
This commit is contained in:
@ -63,7 +63,7 @@ class ResourceListPage extends React.Component {
|
||||
this.setState({uploading: true});
|
||||
const filename = info.fileList[0].name;
|
||||
const fullFilePath = `resource/${this.props.account.owner}/${this.props.account.name}/${filename}`;
|
||||
ResourceBackend.uploadResource("admin", "custom", this.props.account.name, fullFilePath, info.file)
|
||||
ResourceBackend.uploadResource(this.props.account.owner, this.props.account.name, "custom", this.props.account.name, fullFilePath, info.file)
|
||||
.then(res => {
|
||||
if (res.status === "ok") {
|
||||
Setting.showMessage("success", i18next.t("application:File uploaded successfully"));
|
||||
@ -128,6 +128,20 @@ class ResourceListPage extends React.Component {
|
||||
width: '80px',
|
||||
sorter: (a, b) => a.tag.localeCompare(b.tag),
|
||||
},
|
||||
{
|
||||
title: i18next.t("resource:User"),
|
||||
dataIndex: 'user',
|
||||
key: 'user',
|
||||
width: '80px',
|
||||
sorter: (a, b) => a.user.localeCompare(b.user),
|
||||
render: (text, record, index) => {
|
||||
return (
|
||||
<Link to={`/users/${record.owner}/${record.user}`}>
|
||||
{text}
|
||||
</Link>
|
||||
)
|
||||
}
|
||||
},
|
||||
{
|
||||
title: i18next.t("resource:Application"),
|
||||
dataIndex: 'application',
|
||||
|
Reference in New Issue
Block a user