Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelSquires committed Jun 17, 2024
1 parent eee5289 commit 02a9a0c
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 7 deletions.
5 changes: 4 additions & 1 deletion synapse/lib/layer.py
Original file line number Diff line number Diff line change
Expand Up @@ -4648,7 +4648,10 @@ async def confirmLayerEditPerms(self, user, gateiden, delete=False):
perm = perm_edges + verb
user.confirm(perm, gateiden=gateiden)

# FIXME: tombstones??
# tombstones
async for nid, tombtype, tombinfo in s_coro.pause(self.iterTombstones()):
# FIXME: what to do here?
pass

# tags
# NB: tag perms should be yielded for every leaf on every node in the layer
Expand Down
25 changes: 19 additions & 6 deletions synapse/tests/test_lib_layer.py
Original file line number Diff line number Diff line change
Expand Up @@ -1924,8 +1924,14 @@ async def __anit__(self, dirn=None, size=1, cell=None):
user = await core.auth.addUser('[email protected]')

viewiden = await core.callStorm('''
$lyr = $lib.layer.add()
$view = $lib.view.add(($lyr.iden,))
[
(ps:name=* :given=marty)
(ps:name=* :given=emmett)
(ps:name=* :given=biff)
(ps:name=* :given=george)
(ps:name=* :given=loraine)
]
$view = $lib.view.get().fork()
return($view.iden)
''')

Expand Down Expand Up @@ -2005,10 +2011,17 @@ def confirmPropDel(self, user, prop, layriden):
})

await core.nodes('''
test:str=foo
[ <(refs)- { test:str=bar } ]
$node.data.pop(foo)
| delnode
{
test:str=foo
[ <(refs)- { test:str=bar } ]
$node.data.pop(foo)
| delnode
}
{
ps:name:given=biff
ps:name:given=george
| delnode
}
''', opts=opts)

seen.clear()
Expand Down

0 comments on commit 02a9a0c

Please sign in to comment.