legacy-knowledge-base
公開されました Jun. 30, 2025

GUESTユーザーはカスタムオブジェクトAPIにアクセスできません。

written-by

Cristina Rodriguez

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

問題

  • オブジェクトAPIを使用するテンプレートが、ゲストユーザーに対して正しく動作しない。

環境

  • Liferay 7.4と四半期ごとのリリース。

解像度

  • カスタム・オブジェクトのVIEW権限をGUESTロールに追加する必要があります。
  • さらに、開発がデフォルトのサービスアクセスポリシーに含まれていないメソッドを使用している場合、認証されたリクエストを行うためにメソッドを追加する必要があります。 例えば、このリクエストの場合:
restClient.get("/c/mycustomobjects/scopes/8207195

新しいSAPを作成する必要がある:

  • Enabled and Default 有効。
  • サービスクラス com.liferay.object.rest.internal.resource.v1_0.ObjectEntryResourceImpl
  • シグネチャ・メソッド getScopeScopeKeyPage

追加情報

did-this-article-resolve-your-issue

legacy-knowledge-base