Visibility

org.llm4s.rag.permissions.Visibility
See theVisibility companion object
sealed trait Visibility

Who may read a collection or a document, at its own level: anyone the levels above allow (Visibility.Public), only these principals (Visibility.Restricted), or no one but an admin (Visibility.Nobody) (#3350).

It says what queryableBy and readableBy sets cannot: there an empty set means public (for a collection) or "as the collection" (for a document), so a set built from a lookup that found no principal (an unknown group, a typo) opens what was meant to be closed. A Visibility is never empty: Visibility.restricted refuses an empty set, and "no one" is said with Visibility.Nobody.

Levels narrow: a collection is readable only by a user allowed at every collection from the root down (EffectiveAccess), and a document's visibility narrows its collection's. So Public on a document means "anyone who may query its collection", and on a sub-collection "anyone its parents allow".

Attributes

Companion
object
Source
PermissionTypes.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Nobody
object Public
class Restricted
In this article