legacy-knowledge-base
公開されました Sep. 10, 2025

デフォルトのサインイン・ポートレットの代わりにカスタム・ログイン・ページ

written-by

Kanchan Bisht

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

legacy-article

learn-legacy-article-disclaimer-text

問題

  • ユーザがログインしていない状態でプライベートページにアクセスしようとしたときに、デフォルトのサインインポートレットの代わりにカスタムログインページを表示する必要があります。
    • プライベート・ページとパブリック・ページにゲスト・ユーザーの閲覧権限がありません。

環境

  • Liferay DXP 7.4

解像度

  • 以下は、この要件を達成するためのステップである:
    1. portal-ext.properties ファイルに以下のプロパティを設定する:"auth.login.site.url=/sign-in"、"auth.login.url=/sign-in"
    2. ポータルを開始。
    3. コントロールパネル > システム設定 > OTHER > リリース機能フラグ "の "無効な機能 "ドロップダウンを "プライベートページを無効にする "に変更し、プライベートページのリリース機能フラグを削除しました。
    4. デフォルト・サイトの /guest "Friendly URL"(「メニュー > 設定 > サイト設定 > サイト設定 > サイトURL」)を次のように変更。 /abc に変更しました。
    5. 作成された /サインインpublic pageを作成し、そこにサインインウィジェットを設置しました。
    6. GuestユーザーのVIEW権限を削除して、 /restrictedpublic ページを作成しました。
    7. /private-homeprivate ページを作成。
    8. また、ここで'Prompt Enabled'オプションを有効にする[User-is-redirected-the-404-page-instead-of-the-login-page-when-the-session-expires]。
  • さて、このユースケースについて上記の手順をテストしてみよう:
    • Guestユーザーが6番目と7番目のステップで作成した両方のページをヒットすると、 /sign-in 公開ページにつながるはずです。

      例えば、URLパターンは次のようになる:

      制限付き公開ページ:localhost:8080/web/abc/restricted-public-page

      プライベートページ: localhost:8080/group/abc/private-home-page

追加情報

did-this-article-resolve-your-issue

legacy-knowledge-base