Legacy Knowledge Base
公開されました Jun. 30, 2025

オブジェクト・ヘッドレスAPIでゲストが更新(putメソッドの呼び出し)できない

Written By

Tamas Kovacs

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

You are viewing an article from our legacy "FastTrack" publication program, made available for informational purposes. Articles in this program were published without a requirement for independent editing or verification and are provided"as is" without guarantee.

Before using any information from this article, independently verify its suitability for your situation and project.

問題

  • ゲストユーザーでヘッドレスAPIを呼び出し、特定のオブジェクトを更新しようとすると(angularアプリを使用)、以下のエラーが表示されます:
    {

    "status": "FORBIDDEN",

    "title": "User 20099 must have UPDATE permission for com.liferay.object.model.ObjectDefinition#64782 65097"

    }

環境

  • 以下のいずれかのアクションを使用する:
     <action-key>ADD_DOCUMENT</action-key>
    <action-key>ADD_DOCUMENT_TYPE</action-key>
    <action-key>ADD_FOLDER</action-key>
    <action-key>ADD_REPOSITORY</action-key>
    <action-key>ADD_SHORTCUT</action-key>
    <action-key>ADD_STRUCTURE</action-key>
    <action-key>PERMISSIONS</action-key>
    <action-key>SUBSCRIBE</action-key>
    <action-key>UPDATE</action-key>

解像度


  • これはオブジェクトに対してだけでなく、すべての製品を通じて拡張された動作です。 UIやAPI経由でGuestに書き込み権限を与えることはできないので、回避策はありません。
    リスクを避けるために、そのような権限を与えようとすることは本当にお勧めしません。
    GuestにそのようなAPIコールオプションを持たせると、悪意のある行為者がそれを使ってすべての関連レコードを編集/削除/などする可能性があることに注意してください。したがって、Liferayは認証された「ユーザー」(/apps)に対してのみこのようなアクションを許可します。

追加情報

Did this article resolve your issue ?

Legacy Knowledge Base