aboutsummaryrefslogtreecommitdiffstats
path: root/bsfs/graph/ac/null.py
diff options
context:
space:
mode:
authorMatthias Baumgartner <dev@igsor.net>2022-12-22 20:33:00 +0100
committerMatthias Baumgartner <dev@igsor.net>2022-12-22 20:33:00 +0100
commitca7ee6c59d2eb3f4ec4d16e392d12d946cd85e4d (patch)
treee6290053c00e06fda9e41ac0a602ff53d91a38ac /bsfs/graph/ac/null.py
parent73e39cb4967949025aefe874f401e27b0abb772c (diff)
downloadbsfs-ca7ee6c59d2eb3f4ec4d16e392d12d946cd85e4d.tar.gz
bsfs-ca7ee6c59d2eb3f4ec4d16e392d12d946cd85e4d.tar.bz2
bsfs-ca7ee6c59d2eb3f4ec4d16e392d12d946cd85e4d.zip
filter-ast based get interface in graph.
* Graph interface: Graph.get added * Node instance resolver so that Nodes can be used in a filter ast * AC interface: filter_read added to interface * upstream test adjustments of previous sparql store changes
Diffstat (limited to 'bsfs/graph/ac/null.py')
-rw-r--r--bsfs/graph/ac/null.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/bsfs/graph/ac/null.py b/bsfs/graph/ac/null.py
index 36838bd..12b4e87 100644
--- a/bsfs/graph/ac/null.py
+++ b/bsfs/graph/ac/null.py
@@ -10,6 +10,7 @@ import typing
# bsfs imports
from bsfs import schema
from bsfs.namespace import ns
+from bsfs.query import ast
from bsfs.utils import URI
# inner-module imports
@@ -49,4 +50,8 @@ class NullAC(base.AccessControlBase):
"""Return nodes that are allowed to be created."""
return guids
+ def filter_read(self, node_type: schema.Node, query: ast.filter.FilterExpression) -> ast.filter.FilterExpression:
+ """Re-write a filter *query* to get (i.e., read) *node_type* nodes."""
+ return query
+
## EOF ##