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

Scripting Consoleを無効にする方法

written-by

Adam Zsolnay

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

問題

  • Scripting Consoleがサーバー管理ロールを持つ人に限定されているとしても、7.0ポータルではこのスクリプト機能を無効化したいです。

Environment

  • DXP 7.0

解決策


  • com.liferay.portal.scripting.executor-x.y.z.jar
    com.liferay.portal.scripting.groovy-x.y.z.jar以下のモジュールをブラックリスト化することにより、Scripting Console からのスクリプトを無効化できます。


  • com.liferay.portal.bundle.blacklist.internal.BundleBlacklistConfiguration.config (/osgi/configs フォルダ)の blacklistBundleSymbolicNames のプロパティに以下の値を追加すること:

    blacklistBundleSymbolicNames=["com.liferay.portal.scripting.executor","com.liferay.portal.scripting.groovy"]

    期待される結果:これでScripting Console自体が削除されなくても、Scripting Consoleからスクリプトを実行することはできない。

    重要な注意点1: Scripting APIを無効にすると、Scriptページが完全に壊れてしまうようですので、無効にしないでください。 この2つのモジュールを無効にしても、ポータルのコア機能は損なわれません。

    重要な注意事項2: 本番環境に移行する前に、まずテスト環境にて本構成を十分にテストしてください。

追加情報

did-this-article-resolve-your-issue

legacy-knowledge-base