itizawa 6 лет назад
Родитель
Сommit
740904a66c

+ 2 - 2
resource/locales/en-US/translation.json

@@ -438,7 +438,7 @@
     "Load plugins": "Load plugins",
     "Enable": "Enable",
     "Disable": "Disable",
-    "Use env var if empty": "If the value in the database is empty, the value of the environment variable <code>%s</code> is used."
+    "Use env var if empty": "If the value in the database is empty, the value of the environment variable <code>{{env}}</code> is used."
   },
 
   "security_setting": {
@@ -490,7 +490,7 @@
     "Treat username matching as identical_warn": "WARNING: Be aware of security because the system treats the same user as a match of <code>username</code>.",
     "Treat email matching as identical": "Automatically bind external accounts newly logged in to local accounts when <code>%s</code> match",
     "Treat email matching as identical_warn": "WARNING: Be aware of security because the system treats the same user as a match of <code>%s</code>.",
-    "Use env var if empty": "Use env var <code>%s</code> if empty",
+    "Use env var if empty": "Use env var <code>{{env}}</code> if empty",
     "Use default if both are empty": "If both ​​are empty, the default value <code>%s</code> is used.",
     "missing mandatory configs": "The following mandatory items are not set in either database nor environment variables.",
     "Local": {

+ 2 - 2
resource/locales/ja/translation.json

@@ -437,7 +437,7 @@
     "Load plugins": "プラグインを読み込む",
     "Enable": "有効",
     "Disable": "無効",
-    "Use env var if empty": "データベース側の値が空の場合、環境変数 <code>%s</code> の値を利用します"
+    "Use env var if empty": "データベース側の値が空の場合、環境変数 <code>{{env}}</code> の値を利用します"
    },
 
   "security_setting": {
@@ -485,7 +485,7 @@
     "Treat username matching as identical_warn": "警告: <code>username</code> の一致を以て同一ユーザーであるとみなすので、セキュリティに注意してください",
     "Treat email matching as identical": "新規ログイン時、<code>%s</code> が一致したローカルアカウントが存在した場合は自動的に紐付ける",
     "Treat email matching as identical_warn": "警告: <code>%s</code> の一致を以て同一ユーザーであるとみなすので、セキュリティに注意してください",
-    "Use env var if empty": "空の場合、環境変数 <code>%s</code> を利用します",
+    "Use env var if empty": "空の場合、環境変数 <code>{{env}}</code> を利用します",
     "Use default if both are empty": "どちらの値も空の場合、デフォルト値 <code>%s</code> を利用します",
     "missing mandatory configs": "以下の必須項目の値がデータベースと環境変数のどちらにも設定されていません",
     "Local": {

+ 19 - 0
src/client/js/components/Admin/Security/OidcSecuritySetting.jsx

@@ -59,6 +59,7 @@ class OidcSecurityManagement extends React.Component {
         </div>
         {adminGeneralSecurityContainer.state.isOidcEnabled && (
         <React.Fragment>
+
           <div className="row mb-5">
             <label htmlFor="oidcProviderName" className="col-xs-3 text-right">{ t('security_setting.providerName') }</label>
             <div className="col-xs-6">
@@ -71,6 +72,24 @@ class OidcSecurityManagement extends React.Component {
               />
             </div>
           </div>
+
+          <div className="row mb-5">
+            <label htmlFor="oidcIssuerHost" className="col-xs-3 text-right">{ t('security_setting.issuerHost') }</label>
+            <div className="col-xs-6">
+              <input
+                className="form-control"
+                type="text"
+                name="oidcIssuerHost"
+                value={adminOidcSecurityContainer.state.oidcIssuerHost}
+                onChange={e => adminOidcSecurityContainer.changeOidcIssuerHost(e.target.value)}
+              />
+              <p className="help-block">
+                <small dangerouslySetInnerHTML={{ __html: t('security_setting.Use env var if empty', { env: 'OAUTH_OIDC_ISSUER_HOST' }) }} />
+              </p>
+            </div>
+
+          </div>
+
         </React.Fragment>
         )}
       </React.Fragment>

+ 8 - 0
src/client/js/services/AdminOidcSecurityContainer.js

@@ -20,6 +20,7 @@ export default class AdminOidcSecurityContainer extends Container {
       // TODO GW-583 set value
       callbackUrl: '',
       oidcProviderName: '',
+      oidcIssuerHost: '',
     };
 
     this.init();
@@ -44,4 +45,11 @@ export default class AdminOidcSecurityContainer extends Container {
     this.setState({ oidcProviderName: inputValue });
   }
 
+  /**
+   * Change oidcIssuerHost
+   */
+  changeOidcIssuerHost(inputValue) {
+    this.setState({ oidcIssuerHost: inputValue });
+  }
+
 }