• Vincent Pelletier's avatar
    ERP5Catalog: Make user/group distinction scriptable. · d0260f5e
    Vincent Pelletier authored
    This allows breaking a circular dependency of catalog on itself: to
    index a local role, catalog must tell whether it's granted to a group or
    to a user, which used to happen using a catalog lookup (via PAS API),
    preventing catalog from being rebuilt from scratch.
    
    With this change, ERP5Site_filterUserIdSet must be implemented when
    custom role columns are used (viewable_owner is not concerned by this
    change).
    If it is implemented in a way which does not rely on catalog,
    catalog become rebuildable from a lone ZODB, without double-indexation
    of users nor security_uid explosion.
    Nothing prevents relying on catalog (which mayu be desired for
    backward-compatibility purposes), but such script will not be provided
    by generic ERP5, as the impossibility of recreating catalog from ZODB
    is considered a bug, and introducing such script amounts to introducing
    this bug.
    
    Create ERP5Site_filterUserIdList in tests which add custom viewable_*
    columns.
    d0260f5e
CatalogTool.py 58.3 KB