From 3f7e76cca5746c81943fe46f4ff9cdc7f43eb253 Mon Sep 17 00:00:00 2001 From: Fang Date: Wed, 7 Feb 2018 21:07:42 +0100 Subject: [PATCH] Implement requests for reading and writing permission groups. --- sys/vane/clay.hoon | 17 +++++++++++++++++ sys/zuse.hoon | 6 +++--- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/sys/vane/clay.hoon b/sys/vane/clay.hoon index 390f6dec8d..56b735f6e5 100644 --- a/sys/vane/clay.hoon +++ b/sys/vane/clay.hoon @@ -3535,6 +3535,23 @@ $boat :_ ..^$ [hen %give %hill (turn ~(tap by mon.ruf) head)]~ + ::. + $cred + =. cez.ruf + ?~ cew.q.hic (~(del by cez.ruf) nom.q.hic) + (~(put by cez.ruf) nom.q.hic cew.q.hic) + :: wake all desks, a request may have been affected. + =| mos/(list move) + =+ rom=(fall (~(get by fat.ruf) our.q.hic) *room) + =+ des=~(tap in ~(key by dos.rom)) + |- + ?~ des [[[hen %give %mack ~] mos] ..^^$] + =+ den=((de now hen ruf) [. .]:our.q.hic i.des) + =^ mor ruf abet:wake:den + $(des t.des, mos (weld mos mor)) + :: + $crew + [[hen %give %cruz cez.ruf]~ ..^$] :: $drop =^ mos ruf diff --git a/sys/zuse.hoon b/sys/zuse.hoon index 1deb4daf3d..73abafece4 100644 --- a/sys/zuse.hoon +++ b/sys/zuse.hoon @@ -381,7 +381,7 @@ ++ able ^? |% ++ gift :: out result <-$ - $% {$cruz cez/(map @tas crew)} :: permission groups + $% {$cruz cez/(map @ta crew)} :: permission groups {$dirk p/@tas} :: mark mount dirty {$ergo p/@tas q/mode} :: version update {$hill p/(list @tas)} :: mount points @@ -397,8 +397,8 @@ == :: ++ task :: in request ->$ $% {$boat $~} :: pier rebooted - {$cred nom/@ta cew/crew} :: set permission group - {$crew $~} :: permission groups + {$cred our/ship nom/@ta cew/crew} :: set permission group + {$crew our/ship} :: permission groups {$drop p/@p q/desk} :: cancel pending merge {$info p/@p q/desk r/nori} :: internal edit {$init p/@p} :: report install