mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-15 10:02:47 +03:00
permission-store: minor cleanup
This commit is contained in:
parent
717ce5a2b3
commit
fd8313360e
@ -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)
|
||||||
==
|
==
|
||||||
::
|
|
||||||
--
|
--
|
||||||
|
Loading…
Reference in New Issue
Block a user