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:
Fang 2020-02-21 21:45:04 +01:00 committed by GitHub
parent f4bc103a25
commit d80b5d24bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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]