Skip to main content

ユーザー&パーミッションプラグインのregister.allowedFields設定オプションのデフォルトは[]

AI Marketer 5では、ユーザー&パーミッションプラグインのregister.allowedFields設定オプションのデフォルトは[]です。

This page is part of the breaking changes database and provides information about the breaking change and additional instructions to migrate from Strapi v4 to Strapi 5.

🔌 Is this breaking change affecting plugins?No
🤖 Is this breaking change automatically handled by a codemod?Yes

破壊的変更の説明

AI Marketer v4では

ユーザーコンテンツタイプに追加された新しいフィールドは、デフォルトで登録フォームに受け入れられ、AI Marketerはスタートアップ時に各フィールドについて警告します。

ユーザーは、config/plugins.jsファイルでusers-permissions.register.allowedFieldsを自分の登録エンドポイントで受け入れたいフィールドの配列に設定することができます。たとえば、登録時に画像属性を受け入れるために[’picture’]を設定します。または、他のものを受け入れたくない場合は空の配列[]を設定します。

ただし、ユーザーが何も値を設定しなかった場合、つまりallowedFieldsが未定義の場合、すべてのユーザーフィールドが受け入れられます。

AI Marketer 5では

未定義のallowedFieldsは空の配列として扱われ、デフォルトではフィールドは受け入れられません。ユーザーは登録時に追加のフィールドを許可することを明示的に選択する必要があります。

移行

This section regroups useful notes and procedures about the introduced breaking change.

手動手順

この移行はcodemodが処理するはずです。そうでない場合は、ユーザー&パーミッションプラグインの許可されたフィールドの登録についてのドキュメンテーションを参照してください。