mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-03 12:30:19 +08:00
Fix small issues.
This commit is contained in:
@ -88,6 +88,7 @@ p, *, *, POST, /api/unlink, *, *
|
||||
p, *, *, POST, /api/set-password, *, *
|
||||
p, *, *, POST, /api/send-verification-code, *, *
|
||||
p, *, *, GET, /api/get-human-check, *, *
|
||||
p, *, *, POST, /api/reset-email-or-phone, *, *
|
||||
`
|
||||
|
||||
sa := stringadapter.NewAdapter(ruleText)
|
||||
|
@ -57,6 +57,10 @@ func extendApplicationWithProviders(application *Application) {
|
||||
providers := GetProviders(application.Owner)
|
||||
m := map[string]*Provider{}
|
||||
for _, provider := range providers {
|
||||
if provider.Category != "OAuth" {
|
||||
continue
|
||||
}
|
||||
|
||||
provider.ClientSecret = ""
|
||||
provider.ProviderUrl = ""
|
||||
m[provider.Name] = provider
|
||||
|
@ -84,7 +84,7 @@ func getDefaultEmailProvider() *Provider {
|
||||
}
|
||||
|
||||
func getDefaultPhoneProvider() *Provider {
|
||||
provider := Provider{Owner: "admin", Category: "Phone"}
|
||||
provider := Provider{Owner: "admin", Category: "SMS"}
|
||||
existed, err := adapter.Engine.Get(&provider)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
|
@ -187,7 +187,7 @@ class ProviderEditPage extends React.Component {
|
||||
</Col>
|
||||
</Row>
|
||||
</React.Fragment>
|
||||
) : this.state.provider.category === "Phone" ? (
|
||||
) : this.state.provider.category === "SMS" ? (
|
||||
<React.Fragment>
|
||||
<Row style={{marginTop: '20px'}} >
|
||||
<Col style={{marginTop: '5px'}} span={2}>
|
||||
@ -222,7 +222,7 @@ class ProviderEditPage extends React.Component {
|
||||
</React.Fragment>
|
||||
) : null
|
||||
}
|
||||
{this.state.provider.category === "Phone" && this.state.provider.type === "tencent" ? (
|
||||
{this.state.provider.category === "SMS" && this.state.provider.type === "tencent" ? (
|
||||
<Row style={{marginTop: '20px'}} >
|
||||
<Col style={{marginTop: '5px'}} span={2}>
|
||||
{i18next.t("provider:App ID")}:
|
||||
|
@ -148,8 +148,11 @@ class ProviderListPage extends React.Component {
|
||||
title: i18next.t("provider:Client ID"),
|
||||
dataIndex: 'clientId',
|
||||
key: 'clientId',
|
||||
width: '150px',
|
||||
width: '100px',
|
||||
sorter: (a, b) => a.clientId.localeCompare(b.clientId),
|
||||
render: (text, record, index) => {
|
||||
return Setting.getShortText(text);
|
||||
}
|
||||
},
|
||||
// {
|
||||
// title: 'Client secret',
|
||||
|
Reference in New Issue
Block a user