Permission list structure.

This commit is contained in:
Fang 2018-02-12 17:56:48 +01:00
parent ab0dc23065
commit 9f66086936
2 changed files with 10 additions and 9 deletions

View File

@ -68,8 +68,8 @@
dom/dome :: desk state
dok/(unit dork) :: commit state
mer/(unit mery) :: merge state
per/(map path rule) :: read perms per path
pew/(map path rule) :: write perms per path
per/regs :: read perms per path
pew/regs :: write perms per path
==
::
:: Desk state.
@ -242,8 +242,8 @@
dom/dome :: revision state
dok/(unit dork) :: outstanding diffs
mer/(unit mery) :: outstanding merges
per/(map path rule) :: read perms per path
pew/(map path rule) :: write perms per path
per/regs :: read perms per path
pew/regs :: write perms per path
== ::
::
:: Foreign request manager.
@ -831,7 +831,7 @@
==
::
++ put-perm
|= {pes/(map path rule) pax/path new/(unit rule)}
|= {pes/regs pax/path new/(unit rule)}
?~ new (~(del by pes) pax)
(~(put by pes) pax u.new)
::
@ -845,8 +845,8 @@
==
::
++ forget-crew-in
|= {nom/@ta rus/(map path rule)}
%- ~(run by rus)
|= {nom/@ta pes/regs}
%- ~(run by pes)
|= r/rule
r(who (~(del in who.r) |+nom))
::
@ -2407,7 +2407,7 @@
(read-p-in pax pew.red)
::
++ read-p-in
|= {pax/path pes/(map path rule)}
|= {pax/path pes/regs}
^- dict
=+ rul=(~(get by pes) pax)
?^ rul [pax u.rul]
@ -2442,7 +2442,7 @@
(allowed-by w p pew.red)
::
++ allowed-by
|= {who/ship pax/path pes/(map path rule)}
|= {who/ship pax/path pes/regs}
^- ?
=+ rul=rul:(read-p-in pax pes)
=- =(0 -)

View File

@ -505,6 +505,7 @@
{$mult p/mool} :: next version of any
{$many p/? q/moat} :: track range
== ::
++ regs (map path rule) :: rules for paths
++ riff {p/desk q/(unit rave)} :: request+desist
++ rite :: new permissions
$% {$r red/(unit rule)} :: for read