mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-15 10:02:47 +03:00
permission-hook: clean up access-control on %delete
If we %add-owned, then we add an entry to the access-control jug matching the data we put into the synced map. When a permission gets deleted, we remove it from synced, but previously neglected to clean up the matching access-control entry. This ensures that if a permission was deleted, and we had it registered as owned, that the relevant access-control entry is removed from state.
This commit is contained in:
parent
f4bc103a25
commit
d80b5d24bc
@ -195,7 +195,15 @@
|
||||
%delete
|
||||
?. (~(has by synced) path.diff)
|
||||
[~ state]
|
||||
:_ state(synced (~(del by synced) path.diff))
|
||||
=/ control=(unit path)
|
||||
=+ (~(got by synced) path.diff)
|
||||
?. =(our.bowl ship) ~
|
||||
`access-control
|
||||
:_ %_ state
|
||||
synced (~(del by synced) path.diff)
|
||||
access-control ?~ control access-control
|
||||
(~(del ju access-control) u.control path.diff)
|
||||
==
|
||||
:_ ~
|
||||
:* %pass
|
||||
[%permission path.diff]
|
||||
|
Loading…
Reference in New Issue
Block a user