aboutsummaryrefslogtreecommitdiffstats
path: root/bsfs/graph/ac/base.py
diff options
context:
space:
mode:
Diffstat (limited to 'bsfs/graph/ac/base.py')
-rw-r--r--bsfs/graph/ac/base.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/bsfs/graph/ac/base.py b/bsfs/graph/ac/base.py
index bc9aeb3..0703e2e 100644
--- a/bsfs/graph/ac/base.py
+++ b/bsfs/graph/ac/base.py
@@ -10,6 +10,7 @@ import typing
# bsfs imports
from bsfs import schema
+from bsfs.query import ast
from bsfs.triple_store import TripleStoreBase
from bsfs.utils import URI
@@ -67,5 +68,8 @@ class AccessControlBase(abc.ABC):
def createable(self, node_type: schema.Node, guids: typing.Iterable[URI]) -> typing.Iterable[URI]:
"""Return nodes that are allowed to be created."""
+ @abc.abstractmethod
+ 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."""
## EOF ##