mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-15 03:33:49 +08:00
feat: fix org admin permissions (#1822)
This commit is contained in:
@ -111,7 +111,7 @@ class ProviderListPage extends BaseListPage {
|
||||
key: "owner",
|
||||
width: "150px",
|
||||
sorter: true,
|
||||
...this.getColumnSearchProps("owner"),
|
||||
...this.getColumnSearchProps("organization"),
|
||||
},
|
||||
{
|
||||
title: i18next.t("general:Created time"),
|
||||
@ -210,6 +210,7 @@ class ProviderListPage extends BaseListPage {
|
||||
<PopconfirmModal
|
||||
title={i18next.t("general:Sure to delete") + `: ${record.name} ?`}
|
||||
onConfirm={() => this.deleteProvider(index)}
|
||||
disabled={!Setting.isAdminUser(this.props.account) && (record.owner !== this.props.account.owner)}
|
||||
>
|
||||
</PopconfirmModal>
|
||||
</div>
|
||||
@ -253,7 +254,7 @@ class ProviderListPage extends BaseListPage {
|
||||
}
|
||||
this.setState({loading: true});
|
||||
(Setting.isAdminUser(this.props.account) ? ProviderBackend.getGlobalProviders(params.pagination.current, params.pagination.pageSize, field, value, sortField, sortOrder)
|
||||
: ProviderBackend.getProviders(this.state.owner, params.pagination.current, params.pagination.pageSize, field, value, sortField, sortOrder))
|
||||
: ProviderBackend.getProviders(this.props.account.owner, params.pagination.current, params.pagination.pageSize, field, value, sortField, sortOrder))
|
||||
.then((res) => {
|
||||
if (res.status === "ok") {
|
||||
this.setState({
|
||||
|
Reference in New Issue
Block a user