From ecf1be96f0f5994bbc9b3921ba26a06c5bc494c7 Mon Sep 17 00:00:00 2001 From: watura Date: Thu, 19 Dec 2019 15:15:21 +0900 Subject: [PATCH 1/3] chore(deps): availability --- composer.json | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 2c8e8e7..1fb79c1 100644 --- a/composer.json +++ b/composer.json @@ -22,9 +22,13 @@ ] } }, + "repositories": [ + {"type": "vcs", "url": "https://github.com/WillBooster/NC3Auth.git"}, + {"type": "vcs", "url": "https://github.com/WillBooster/NetCommons.git"} + ], "require": { "netcommons/mails": "@dev", - "netcommons/net-commons": "@dev", + "netcommons/net-commons": "dev-availability", "netcommons/site-manager": "@dev", "netcommons/user-attributes": "@dev", "netcommons/users": "@dev" From 9326a67d7da32e953a0c7b7496aa944d91b558d0 Mon Sep 17 00:00:00 2001 From: watura Date: Thu, 19 Dec 2019 15:53:14 +0900 Subject: [PATCH 2/3] revert: --- composer.json | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/composer.json b/composer.json index 1fb79c1..2c8e8e7 100644 --- a/composer.json +++ b/composer.json @@ -22,13 +22,9 @@ ] } }, - "repositories": [ - {"type": "vcs", "url": "https://github.com/WillBooster/NC3Auth.git"}, - {"type": "vcs", "url": "https://github.com/WillBooster/NetCommons.git"} - ], "require": { "netcommons/mails": "@dev", - "netcommons/net-commons": "dev-availability", + "netcommons/net-commons": "@dev", "netcommons/site-manager": "@dev", "netcommons/user-attributes": "@dev", "netcommons/users": "@dev" From 4766b5d268152f7ea1366dd64042255861bd947e Mon Sep 17 00:00:00 2001 From: watura Date: Mon, 23 Dec 2019 08:47:00 +0900 Subject: [PATCH 3/3] feat(login): redirect when Router::fullBaseUrl() is not same as App.loginUrl --- Controller/AuthController.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Controller/AuthController.php b/Controller/AuthController.php index 2383120..037b4dd 100644 --- a/Controller/AuthController.php +++ b/Controller/AuthController.php @@ -98,6 +98,14 @@ public function index() { * @throws InternalErrorException **/ public function login() { + // ログイン機能をサブドメインにする変更のために、App.loginUrl を追加して + // ログイン画面のURLが違ったら転送するようにする + $loginUrl = Configure::read('App.loginUrl'); + if ($loginUrl != "" && Router::fullBaseUrl() != $loginUrl) { + $this->redirect($loginUrl . '/auth/login'); + return; + } + //ページタイトル $this->set('pageTitle', __d('auth', 'Login'));