さまざまなロールに基づいてポータルリダイレクトをセットアップする方法Summary<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: #000000; } span { font-size: 12pt; font-family: Lato; color: #000000; } h2 { font-size: 24pt; font-family: Lato; color: black; } h3 { font-size: 18pt; font-family: Lato; color: black; } h4 { font-size: 14pt; font-family: Lato; color: black; } a { font-size: 12pt; font-family: Lato; color: #00718F; } a:hover { font-size: 12pt; color: #024F69; } a:target { font-size: 12pt; color: #032D42; } a:visited { font-size: 12pt; color: #00718f; } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } 以下のシナリオを考えてみましょう。 SP と CSM は 2 つのポータルです。 CSM ポータルはロール sn_customerservice.consumer によって使用され、SP ポータルは他のエンドユーザーによって使用されます (ロールなし)。 アドミンユーザーおよびその他のロールベースのユーザーの場合は、ネイティブ UI に移動する必要があります。 Release<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: #000000; } span { font-size: 12pt; font-family: Lato; color: #000000; } h2 { font-size: 24pt; font-family: Lato; color: black; } h3 { font-size: 18pt; font-family: Lato; color: black; } h4 { font-size: 14pt; font-family: Lato; color: black; } a { font-size: 12pt; font-family: Lato; color: #00718F; } a:hover { font-size: 12pt; color: #024F69; } a:target { font-size: 12pt; color: #032D42; } a:visited { font-size: 12pt; color: #00718f; } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } サポートされているすべてのリリース Instructions<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: #000000; } span { font-size: 12pt; font-family: Lato; color: #000000; } h2 { font-size: 24pt; font-family: Lato; color: black; } h3 { font-size: 18pt; font-family: Lato; color: black; } h4 { font-size: 14pt; font-family: Lato; color: black; } a { font-size: 12pt; font-family: Lato; color: #00718F; } a:hover { font-size: 12pt; color: #024F69; } a:target { font-size: 12pt; color: #032D42; } a:visited { font-size: 12pt; color: #00718f; } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } これは、OOB SPEntryPage をクローンすることで実現できます。カスタムスクリプトインクルードを作成したら、以下のシステムプロパティを変更する必要があります。 glide.entry.first.page.script - 新値を新しい NAME_OF_NEW_SCRIPT().getFirstPageURL() へ設定しますglide.entry.page.script - 値を新しい NAME_OF_NEW_SCRIPT().getLoginURL() として設定します。 69 行目を次のように変更します。 if(user.hasRole('admin')){gs.log("Admin Redirection 1");return "/?.do";}else if (user.hasRoles() && !redirectURL && !isServicePortalURL){gs.log("Redirection 1");return "/?.do";}else if (user.hasRole('sn_customerservice.consumer') && !redirectURL && !isServicePortalURL){gs.log("Redirection 2");return "/csm";}else if(!user.hasRoles() && !redirectURL && !isServicePortalURL){gs.log("Redirection 3");return "/sp";} Related Links<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: #000000; } span { font-size: 12pt; font-family: Lato; color: #000000; } h2 { font-size: 24pt; font-family: Lato; color: black; } h3 { font-size: 18pt; font-family: Lato; color: black; } h4 { font-size: 14pt; font-family: Lato; color: black; } a { font-size: 12pt; font-family: Lato; color: #00718F; } a:hover { font-size: 12pt; color: #024F69; } a:target { font-size: 12pt; color: #032D42; } a:visited { font-size: 12pt; color: #00718f; } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } ここでは、admin ユーザーの hasRole チェックが常に最初の if 条件であることを確認する必要があります。 gs.hasRole は、admin ユーザーの任意のロールに対して true を返します。 これは想定されるプラットフォームの動作です。 ここでは、すべてのユーザーに共通のログインページを設定し、リダイレクトはログイン後に行う必要があります。 その場合は、ポータルレコードからログインページを削除して、すべてのユーザーが login.do にアクセスするようにすることができます また、カスタムスクリプトインクルードの 22 行目を次のように変更する必要があります。 this.portal = "/sp/"; 変更後 this.portal = "/login.do"; 重要 - この記事に記載されている変更はカスタマイズであり、サポートの範囲外です。これらの変更は、互換性を確認するために上位のインスタンスで検証する必要があります。