Repository navigation
feat: add disable field filtering option - #399
Conversation
2 new issues
|
| attr_accessor :foreign_key, :foreign_key_target, :is_filterable | ||
|
|
||
| def initialize(foreign_key:, foreign_key_target:, foreign_collection:, is_read_only: false) | ||
| def initialize(foreign_key:, foreign_key_target:, foreign_collection:, is_read_only: false, is_filterable: true) |
| attr_accessor :origin_key, :origin_key_target, :is_filterable | ||
|
|
||
| def initialize(origin_key:, origin_key_target:, foreign_collection:, is_read_only: false) | ||
| def initialize(origin_key:, origin_key_target:, foreign_collection:, is_read_only: false, is_filterable: true) |
|
Coverage Impact This PR will not change total coverage. Modified Files with Diff Coverage (6) 🛟 Help
|
There was a problem hiding this comment.
🟠 High
Constructing SchemaCollectionDecorator raises NameError for Set when set has not already been loaded, preventing the customizer from booting. This file does not require the standard-library set, so require it before initializing @unfilterable_fields.
| require 'set' | |
| module ForestAdminDatasourceCustomizer |
🚀 Reply "fix it for me" or copy this AI Prompt for your agent:
In file @packages/forest_admin_datasource_customizer/lib/forest_admin_datasource_customizer/decorators/schema/schema_collection_decorator.rb around line 1:
Constructing `SchemaCollectionDecorator` raises `NameError` for `Set` when `set` has not already been loaded, preventing the customizer from booting. This file does not require the standard-library `set`, so require it before initializing `@unfilterable_fields`.
# [1.45.0](v1.44.5...v1.45.0) (2026-10-07) ### Features * add disable field filtering option ([#399](#399)) ([b537254](b537254))
|
🎉 This PR is included in version 1.45.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |

Definition of Done
General
Security
Note
Add
disable_field_filteringoption to collection customizersdisable_field_filteringmethod onCollectionCustomizerthat hides end-user filtering for a named Column, ManyToOne, or OneToOne field. The schema decorator copies the field, clears filter operators for columns, and setsis_filterableto false for relations, without changing the original field map.is_filterableaccessor toManyToOneSchemaandOneToOneSchema(default true) in the datasource toolkit, andGeneratorFieldnow honors it when building relation schemas.ConditionTreeValidator.validate_leafnow walks each relation segment and raises a validation error at the first relation whoseis_filterableis false. Direct foreign-key column filters are not blocked by the relation flag.disable_field_filteringraises for unknown fields, primary-key columns, OneToMany, and ManyToMany relations; nested condition trees through a disabled relation now fail validation.📊 Macroscope summarized b172e2d. 6 files reviewed, 1 issue evaluated, 0 issues filtered, 1 comment posted
🗂️ Filtered Issues