bsfs.graph.ac.base module#
- class bsfs.graph.ac.base.AccessControlBase(backend: TripleStoreBase, user: URI)#
Bases:
ABC
Defines the interface for access control policies.
An access control policy governs which actions a user may take to query or to manipulate a graph.
- abstract create(node_type: Node, guids: Iterable[URI])#
Perform post-creation operations on nodes, e.g. ownership information.
- abstract createable(node_type: Node, guids: Iterable[URI]) Iterable[URI] #
Return nodes that are allowed to be created.
- abstract fetch_read(node_type: Node, query: FetchExpression) FetchExpression #
Re-write a fetch query to get (i.e, read) values for node_type nodes.
- abstract filter_read(node_type: Node, query: FilterExpression | None) FilterExpression | None #
Re-write a filter query to get (i.e., read) node_type nodes.
- abstract is_protected_predicate(pred: Predicate) bool #
Return True if a predicate cannot be modified manually.
- abstract link_from_node(node_type: Node, guids: Iterable[URI]) Iterable[URI] #
Return nodes for which outbound links can be written.