Row visibility rules
Filter which records a user can see, beyond the entity-level read permission. Row visibility is applied on every list query.
Rule types
| Type | How it works | Example |
|---|---|---|
user | Only rows where user_field = current_user_id | A "My Tasks" entity where assigned_to is a User field — each user sees only their own tasks |
role | Only visible to users who carry the specified role | A "VIP Customers" entity visible only to users with the vip_agent role |
Configuration
Each rule has:
- Entity — which entity it governs
- Type —
userorrole - User field (type=user) — which User-type field links to the WP user
- Role slug (type=role) — which PFM role is required
- Active — on/off toggle
How it works technically
Row visibility rules are injected as EQL conditions into every record list query via the pfm_row_visibility_eql filter. This means they work consistently across the REST API, list views, and search.
Row visibility is additive — if you have multiple rules,
the user sees records that match ANY of them.
the user sees records that match ANY of them.