permission-store: minor cleanup

This commit is contained in:
Fang 2019-11-21 17:52:57 +01:00
parent 717ce5a2b3
commit fd8313360e
No known key found for this signature in database
GPG Key ID: EB035760C1BBA972

View File

@ -1,5 +1,4 @@
:: permission-store: data store for keeping track of permissions :: permission-store: track black- and whitelists of ships
:: permissions are white lists or black lists of ships
:: ::
/- *permission-store /- *permission-store
/+ default-agent /+ default-agent
@ -7,11 +6,6 @@
|% |%
+$ card card:agent:gall +$ card card:agent:gall
:: ::
+$ diff
$% [%permission-initial =permission-map]
[%permission-update =permission-update]
==
::
+$ versioned-state +$ versioned-state
$% state-zero $% state-zero
== ==
@ -31,7 +25,7 @@
pc ~(. permission-core bowl) pc ~(. permission-core bowl)
def ~(. (default-agent this %|) bowl) def ~(. (default-agent this %|) bowl)
:: ::
++ on-init on-init:def ++ on-init on-init:def
++ on-save !>(state) ++ on-save !>(state)
++ on-load ++ on-load
|= old=vase |= old=vase
@ -74,7 +68,7 @@
^- (unit (unit cage)) ^- (unit (unit cage))
?+ path (on-peek:def path) ?+ path (on-peek:def path)
[%x %keys ~] ``noun+!>(~(key by permissions)) [%x %keys ~] ``noun+!>(~(key by permissions))
[%x %permission *] [%x %permission *]
?~ t.t.path ~ ?~ t.t.path ~
``noun+!>((~(get by permissions) t.t.path)) ``noun+!>((~(get by permissions) t.t.path))
[%x %permitted @ *] [%x %permitted @ *]
@ -199,5 +193,4 @@
(update-subscribers /updates upd) (update-subscribers /updates upd)
(update-subscribers [%permission pax] upd) (update-subscribers [%permission pax] upd)
== ==
::
-- --