How to set "keep me logged in" checkbox to disabled by default in Jira Service Desk customer portal?
プラットフォームについて: Data Center - この記事は、Data Center プラットフォームのアトラシアン製品に適用されます。
このナレッジベース記事は製品の Data Center バージョン用に作成されています。Data Center 固有ではない機能の Data Center ナレッジベースは、製品のサーバー バージョンでも動作する可能性はありますが、テストは行われていません。サーバー*製品のサポートは 2024 年 2 月 15 日に終了しました。サーバー製品を利用している場合は、アトラシアンのサーバー製品のサポート終了のお知らせページにて移行オプションをご確認ください。
*Fisheye および Crucible は除く
本記事で説明している手順は、現時点でのものとなります。そのため、一部のお客様で特定の状況下で動作したという報告がありますが、正式にサポートされているわけではなく、お客様の特定のシナリオで動作することを保証するものではありません。
本番環境での実施の前に一通り非本番環境で検証し、成功しなかった場合にはサポートされている代替案にフォール バックしてください。
問題
There is no UI option for setting this behavior, but it is possible to achieve this by customizing the Service Management JAR package. Please notice that since this is a customization, this change is not officially supported.
回避策
This is the JAR that needs to be modified: <jira-home>/plugins/installed-plugins/jira-servicedesk-X.X.X.jar
- Create a temporary folder and extract the jira-servicedesk-X.X.X.jar file there.
- You will need to find the following file cv-login-form.soy, probably at /servicedesk/customer/feature/login/loginform/ folder.
You will need to find and remove the checked=" " atribute in the following content:
<div class="buttons-container"> <div class="buttons"> <input class="aui-button {if $login.googleApps.enabled == false}aui-button-primary{/if} aui-style" type="submit" value="{getText('cv.login.submit.label')}" id="js-login-submit"> <span class="cv-status js-status"></span> </div> <input type="checkbox" class="checkbox remember-login" id="form-remember-login" name="os_cookie" checked=""> <label for="form-remember-login">{getText('cv.login.remember.me')}</label> </div>
- Create a new JAR container after modifying the file and name it the same as the original JAR file (e.g. jira-servicedesk-X.X.X.jar).
- Replace the original JAR file on the folder from where it was copied originally with the modified JAR file.
- Restart your Jira Instance.