diff --git a/object/application.go b/object/application.go
index 44cb9a1f..dc947a4c 100644
--- a/object/application.go
+++ b/object/application.go
@@ -35,12 +35,13 @@ type Application struct {
ProviderObjs []*Provider `xorm:"-" json:"providerObjs"`
OrganizationObj *Organization `xorm:"-" json:"organizationObj"`
- ClientId string `xorm:"varchar(100)" json:"clientId"`
- ClientSecret string `xorm:"varchar(100)" json:"clientSecret"`
- RedirectUris []string `xorm:"varchar(1000)" json:"redirectUris"`
- ExpireInHours int `json:"expireInHours"`
- SignupUrl string `xorm:"varchar(100)" json:"signupUrl"`
- ForgetUrl string `xorm:"varchar(100)" json:"forgetUrl"`
+ ClientId string `xorm:"varchar(100)" json:"clientId"`
+ ClientSecret string `xorm:"varchar(100)" json:"clientSecret"`
+ RedirectUris []string `xorm:"varchar(1000)" json:"redirectUris"`
+ ExpireInHours int `json:"expireInHours"`
+ SignupUrl string `xorm:"varchar(100)" json:"signupUrl"`
+ ForgetUrl string `xorm:"varchar(100)" json:"forgetUrl"`
+ AffiliationUrl string `xorm:"varchar(100)" json:"affiliationUrl"`
}
func GetApplications(owner string) []*Application {
diff --git a/web/src/ApplicationEditPage.js b/web/src/ApplicationEditPage.js
index 87ab7bd0..f685fe70 100644
--- a/web/src/ApplicationEditPage.js
+++ b/web/src/ApplicationEditPage.js
@@ -256,6 +256,16 @@ class ApplicationEditPage extends React.Component {
}} />
+
+
+ {i18next.t("general:Affiliation URL")}:
+
+
+ } value={this.state.application.affiliationUrl} onChange={e => {
+ this.updateApplicationField('affiliationUrl', e.target.value);
+ }} />
+
+
{i18next.t("general:Providers")}:
diff --git a/web/src/UserEditPage.js b/web/src/UserEditPage.js
index f8984308..0647ea67 100644
--- a/web/src/UserEditPage.js
+++ b/web/src/UserEditPage.js
@@ -286,9 +286,17 @@ class UserEditPage extends React.Component {
{i18next.t("user:Affiliation")}:
- {
- this.updateUserField('affiliation', e.target.value);
- }} />
+ {
+ this.state.application?.affiliationUrl === "" ? (
+ {
+ this.updateUserField('affiliation', e.target.value);
+ }} />
+ ) : (
+
+ )
+ }
diff --git a/web/src/locales/en.json b/web/src/locales/en.json
index fbf290f8..7ec47f3c 100644
--- a/web/src/locales/en.json
+++ b/web/src/locales/en.json
@@ -114,6 +114,7 @@
"Set password...": "Set password...",
"Modify password...": "Modify password...",
"Affiliation": "Affiliation",
+ "Modify affiliation": "Modify affiliation",
"Tag": "Tag",
"Third-party logins": "Third-party logins",
"Link": "Link",
diff --git a/web/src/locales/zh.json b/web/src/locales/zh.json
index 72571e48..8536f2b0 100644
--- a/web/src/locales/zh.json
+++ b/web/src/locales/zh.json
@@ -114,6 +114,7 @@
"Set password...": "设置密码...",
"Modify password...": "修改密码...",
"Affiliation": "工作单位",
+ "Modify affiliation": "修改工作单位",
"Tag": "标签",
"Third-party logins": "第三方登录",
"Link": "绑定",