mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-04 05:10:19 +08:00
Remove /get-default-providers API.
This commit is contained in:
@ -22,7 +22,6 @@ import i18next from "i18next";
|
||||
import CropperDiv from "./CropperDiv.js";
|
||||
import * as AuthBackend from "./auth/AuthBackend";
|
||||
import * as ApplicationBackend from "./backend/ApplicationBackend";
|
||||
import * as ProviderBackend from "./backend/ProviderBackend";
|
||||
import * as Provider from "./auth/Provider";
|
||||
import PasswordModal from "./PasswordModal";
|
||||
import ResetModal from "./ResetModal";
|
||||
@ -39,7 +38,6 @@ class UserEditPage extends React.Component {
|
||||
user: null,
|
||||
application: null,
|
||||
organizations: [],
|
||||
providers: [],
|
||||
};
|
||||
}
|
||||
|
||||
@ -47,7 +45,6 @@ class UserEditPage extends React.Component {
|
||||
this.getUser();
|
||||
this.getOrganizations();
|
||||
this.getDefaultApplication();
|
||||
this.getDefaultProviders();
|
||||
}
|
||||
|
||||
getUser() {
|
||||
@ -77,15 +74,6 @@ class UserEditPage extends React.Component {
|
||||
});
|
||||
}
|
||||
|
||||
getDefaultProviders() {
|
||||
ProviderBackend.getDefaultProviders("admin")
|
||||
.then((res) => {
|
||||
this.setState({
|
||||
providers: res,
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
parseUserField(key, value) {
|
||||
// if ([].includes(key)) {
|
||||
// value = Setting.myParseInt(value);
|
||||
@ -316,7 +304,7 @@ class UserEditPage extends React.Component {
|
||||
<Col span={22} >
|
||||
<div style={{marginBottom: 20}}>
|
||||
{
|
||||
this.state.providers.filter(provider => Setting.isProviderVisible(provider)).map((provider, index) => this.renderIdp(provider))
|
||||
this.state.application?.providerObjs.filter(provider => Setting.isProviderVisible(provider)).map((provider, index) => this.renderIdp(provider))
|
||||
}
|
||||
</div>
|
||||
</Col>
|
||||
|
@ -21,13 +21,6 @@ export function getProviders(owner) {
|
||||
}).then(res => res.json());
|
||||
}
|
||||
|
||||
export function getDefaultProviders(owner) {
|
||||
return fetch(`${Setting.ServerUrl}/api/get-default-providers?owner=${owner}`, {
|
||||
method: "GET",
|
||||
credentials: "include"
|
||||
}).then(res => res.json());
|
||||
}
|
||||
|
||||
export function getProvider(owner, name) {
|
||||
return fetch(`${Setting.ServerUrl}/api/get-provider?id=${owner}/${encodeURIComponent(name)}`, {
|
||||
method: "GET",
|
||||
|
Reference in New Issue
Block a user