Function listing_is_authorized
pub fn listing_is_authorized(
config: &Config,
grants: &ResolvedGrants,
requested: &Path,
) -> boolExpand description
Whether a principal holding grants may list the directory at requested.
Operator-level principals may list anything. Every other principal may list only a path that an enabled agent it is entitled to use may read, judged by that agent’s resolved policy: its workspace, readable allowed roots, readable sibling workspaces, and the shared skills directory when the policy is workspace-only, and anything outside its forbidden paths when it is not. The policy resolves the path first, so a symlink is judged by its target and a path that cannot be resolved is refused rather than assumed benign.
Resolving an agent’s policy creates its workspace directory if it is missing, as every other use of that policy does.