mirror of
https://github.com/urbit/shrub.git
synced 2024-12-21 09:51:36 +03:00
57 lines
1.1 KiB
Plaintext
57 lines
1.1 KiB
Plaintext
|
/+ *permission-json
|
||
|
|_ upd=permission-update
|
||
|
::
|
||
|
++ grow
|
||
|
|%
|
||
|
++ json
|
||
|
=, enjs:format
|
||
|
^- ^json
|
||
|
%+ frond %permission-update
|
||
|
%- pairs
|
||
|
:~
|
||
|
::
|
||
|
:: %create
|
||
|
?: =(%create -.upd)
|
||
|
?> ?=(%create -.upd)
|
||
|
:- %create
|
||
|
%- pairs
|
||
|
:~ [%path (path path.upd)]
|
||
|
[%kind s+kind.permission.upd]
|
||
|
[%who [%a (turn ~(tap in who.permission.upd) ship)]]
|
||
|
==
|
||
|
::
|
||
|
:: %delete
|
||
|
?: =(%delete -.upd)
|
||
|
?> ?=(%delete -.upd)
|
||
|
[%delete (path path.upd)]
|
||
|
::
|
||
|
:: %add
|
||
|
?: =(%add -.upd)
|
||
|
?> ?=(%add -.upd)
|
||
|
:- %add
|
||
|
%- pairs
|
||
|
:~ [%path (path path.upd)]
|
||
|
[%who [%a (turn ~(tap in who.upd) ship)]]
|
||
|
==
|
||
|
::
|
||
|
:: %remove
|
||
|
?: =(%remove -.upd)
|
||
|
?> ?=(%remove -.upd)
|
||
|
:- %remove
|
||
|
%- pairs
|
||
|
:~ [%path (path path.upd)]
|
||
|
[%who [%a (turn ~(tap in who.upd) ship)]]
|
||
|
==
|
||
|
::
|
||
|
:: %noop
|
||
|
[*@t *^json]
|
||
|
==
|
||
|
--
|
||
|
::
|
||
|
++ grab
|
||
|
|%
|
||
|
++ noun permission-update
|
||
|
--
|
||
|
::
|
||
|
--
|