pub fn can_view_item(
subject_id_tag: &str,
is_authenticated: bool,
item_owner_id_tag: &str,
tenant_id_tag: &str,
visibility: Option<char>,
subject_following_owner: bool,
subject_connected_to_owner: bool,
audience_tags: Option<&[&str]>,
) -> boolExpand description
Check if subject can view an item based on visibility and relationship
This is a standalone function for use in list filtering where we don’t have full ABAC context. It evaluates visibility rules directly.
§Arguments
subject_id_tag- The viewer’s id_tag (empty string for anonymous)is_authenticated- Whether the subject is authenticateditem_owner_id_tag- The item owner/issuer’s id_tagtenant_id_tag- The tenant’s id_tag (owner of the node where item is stored)visibility- The item’s visibility level (None = Direct)subject_following_owner- Whether the subject follows the ownersubject_connected_to_owner- Whether the subject is connected to owneraudience_tags- Optional list of audience id_tags (for Direct visibility)