Skip to content

Commit c413df1

Browse files
committed
パスワード付きページの追加処理
1 parent bef4d77 commit c413df1

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

app/Http/Controllers/Core/DefaultController.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,12 @@ public function invokePost(Request $request, $plugin_name, $action = null, $page
293293
// アプリのロケールを変更
294294
$this->setAppLocale();
295295

296+
// パスワード付きページのチェック(パスワードを要求するか確認)
297+
if ($this->page && $this->page->isRequestPassword($request)) {
298+
// 認証されていなくてパスワードを要求する場合、パスワード要求画面を表示
299+
return redirect("/password/input/" . $this->page->id);
300+
}
301+
296302
// 現在のページが参照可能か判定して、NG なら403 ページを振り向ける。
297303
$this->checkPageForbidden();
298304

@@ -427,6 +433,12 @@ public function invokePostRedirect(Request $request, $plugin_name, $action = nul
427433
// アプリのロケールを変更
428434
$this->setAppLocale();
429435

436+
// パスワード付きページのチェック(パスワードを要求するか確認)
437+
if ($this->page && $this->page->isRequestPassword($request)) {
438+
// 認証されていなくてパスワードを要求する場合、パスワード要求画面を表示
439+
return redirect("/password/input/" . $this->page->id);
440+
}
441+
430442
// 現在のページが参照可能か判定して、NG なら403 ページを振り向ける。
431443
$http_status_code = $this->checkPageForbidden();
432444

0 commit comments

Comments
 (0)