aboutsummaryrefslogtreecommitdiffstats
path: root/bsfs/graph/ac/null.py
diff options
context:
space:
mode:
authorMatthias Baumgartner <dev@igsor.net>2023-03-05 19:25:17 +0100
committerMatthias Baumgartner <dev@igsor.net>2023-03-05 19:25:17 +0100
commite4845c627e97a6d125bf33d9e7a4a8d373d7fc4a (patch)
tree634198c34aae3c0306ce30ac7452abd7b53a14e8 /bsfs/graph/ac/null.py
parent9b490d19dcebc0fc24cb2ab89a783f1f7d6147f7 (diff)
parent3ae93a405724ca6b5ddeb0b458fcc95685f83f09 (diff)
downloadbsfs-e4845c627e97a6d125bf33d9e7a4a8d373d7fc4a.tar.gz
bsfs-e4845c627e97a6d125bf33d9e7a4a8d373d7fc4a.tar.bz2
bsfs-e4845c627e97a6d125bf33d9e7a4a8d373d7fc4a.zip
Merge branch 'mb/diogenes' into develop
Diffstat (limited to 'bsfs/graph/ac/null.py')
-rw-r--r--bsfs/graph/ac/null.py13
1 files changed, 6 insertions, 7 deletions
diff --git a/bsfs/graph/ac/null.py b/bsfs/graph/ac/null.py
index 6a923a5..c9ec7d0 100644
--- a/bsfs/graph/ac/null.py
+++ b/bsfs/graph/ac/null.py
@@ -1,9 +1,4 @@
-"""
-Part of the BlackStar filesystem (bsfs) module.
-A copy of the license is provided with the project.
-Author: Matthias Baumgartner, 2022
-"""
# imports
import typing
@@ -29,7 +24,7 @@ class NullAC(base.AccessControlBase):
def is_protected_predicate(self, pred: schema.Predicate) -> bool:
"""Return True if a predicate cannot be modified manually."""
- return pred.uri == ns.bsm.t_created
+ return pred.uri == ns.bsn.t_created
def create(self, node_type: schema.Node, guids: typing.Iterable[URI]):
"""Perform post-creation operations on nodes, e.g. ownership information."""
@@ -50,7 +45,11 @@ 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:
+ def filter_read(
+ self,
+ node_type: schema.Node,
+ query: typing.Optional[ast.filter.FilterExpression]
+ ) -> typing.Optional[ast.filter.FilterExpression]:
"""Re-write a filter *query* to get (i.e., read) *node_type* nodes."""
return query