mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-04 13:20:19 +08:00
feat: fix org admin permissions (#1822)
This commit is contained in:
@ -26,10 +26,10 @@ class AdapterListPage extends BaseListPage {
|
||||
newAdapter() {
|
||||
const randomName = Setting.getRandomName();
|
||||
return {
|
||||
owner: "built-in",
|
||||
owner: "admin",
|
||||
name: `adapter_${randomName}`,
|
||||
createdTime: moment().format(),
|
||||
organization: "built-in",
|
||||
organization: this.props.account.owner,
|
||||
type: "Database",
|
||||
host: "localhost",
|
||||
port: 3306,
|
||||
@ -247,7 +247,7 @@ class AdapterListPage extends BaseListPage {
|
||||
value = params.type;
|
||||
}
|
||||
this.setState({loading: true});
|
||||
AdapterBackend.getAdapters("", params.pagination.current, params.pagination.pageSize, field, value, sortField, sortOrder)
|
||||
AdapterBackend.getAdapters("admin", Setting.isAdminUser(this.props.account) ? "" : 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