mirror of
https://github.com/mattermost/mattermost.git
synced 2026-10-28 02:36:08 +08:00
* [MM-69366] Scope property field lookups by object type Add GetFieldByNameForObjectType and route the access-control attribute lookups through it, so a user custom profile attribute is no longer confused with the internal classification fields that share its name. Deprecate the name-only GetFieldByName (kept only for the plugin API) and move internal callers onto the scoped variant. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * Add test store mock expectations for GetFieldByNameForObjectType The startup migrations now look up fields via the scoped method, so the testlib mock store needs matching expectations — notably the managed category field, whose ID is cached at startup. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * Fix store test to create valid PSAv2 property fields Setting ObjectType makes a field PSAv2, which requires a valid target type, so the test fields now use the system target level (with an empty target ID) instead of an unset target type. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>