Skip to main content

can_view_field

Function can_view_field 

Source
pub fn can_view_field<R, T>(
    cx: &Cx,
    field: impl Into<Path<<R as Resource>::Model, T>>,
) -> bool
where R: Resource,
Expand description

Whether the current request may view R’s field: the request’s panel mounts R, and no ResourceDef::field_access rule over the model hides the field from it. The panel’s own pages mask a hidden field; a RecordPage shows one only after asking this.

A field that is no root field of the model, lens!(Post.author.name) say, answers false.