require 'fiona7/obj_class_name_mangler' module Fiona7 class ForbiddenObjClasses SYSTEM_CLASSES = ['X_Generic', 'X_Image', 'X_Container'].freeze def call # NOTE: to_s handles shadow classes properly widget_classes = Scrivito.models.widgets.map(&:to_s) widget_obj_classes = widget_classes.map do |obj_class| Fiona7::ObjClassNameMangler.new(obj_class).mangle end SYSTEM_CLASSES + widget_obj_classes end end end