mirror of
https://github.com/urbit/shrub.git
synced 2024-11-28 13:54:20 +03:00
Revert "gall: add permissions to scry paths"
This reverts commit 6e542d4afe
.
This commit is contained in:
parent
45617df540
commit
9890e5b8da
@ -3291,10 +3291,8 @@
|
||||
sup=bitt :: incoming subs
|
||||
$= sky :: scry bindings
|
||||
%+ map path ::
|
||||
$: lyc=gang :: permissions
|
||||
$= fan :: data
|
||||
((mop @ud (pair @da (each page @uvI))) lte)
|
||||
== == ::
|
||||
((mop @ud (pair @da (each page @uvI))) lte) ::
|
||||
== ::
|
||||
$: act=@ud :: change number
|
||||
eny=@uvJ :: entropy
|
||||
now=@da :: current time
|
||||
@ -3337,7 +3335,6 @@
|
||||
[%grow =spur =page]
|
||||
[%tomb =case =spur]
|
||||
[%cull =case =spur]
|
||||
[%perm =spur diff=$-(gang gang)]
|
||||
==
|
||||
+$ task
|
||||
$% [%watch =path]
|
||||
|
@ -102,7 +102,6 @@
|
||||
::
|
||||
+$ path-state
|
||||
$: bob=(unit @ud)
|
||||
lyc=gang
|
||||
fan=((mop @ud (pair @da (each page @uvI))) lte)
|
||||
==
|
||||
::
|
||||
@ -322,7 +321,7 @@
|
||||
run-nonce (scot %uw (end 5 (shas %yoke-nonce eny)))
|
||||
sky
|
||||
?~ yak ~
|
||||
(~(run by sky.u.yak) (cork (lead ~) (late [~ ~])))
|
||||
(~(run by sky.u.yak) (corl (late ~) (lead ~)))
|
||||
==
|
||||
::
|
||||
=/ old mo-core
|
||||
@ -1033,20 +1032,7 @@
|
||||
%+ trace odd.veb.bug.state
|
||||
[leaf+"gall: {<agent-name>}: cull {<[case spur]>} no-op"]~
|
||||
%+ ~(put by sky.yoke) spur :: delete all older paths
|
||||
u.old(bob `yon, fan (lot:on-path fan.u.old `+(yon) ~))
|
||||
:: +ap-perm: change permissions on a scry path
|
||||
::
|
||||
:: If the agent so requests, we store permissions even for
|
||||
:: empty paths, to avoid timing issues when %grow comes
|
||||
:: before %perm.
|
||||
::
|
||||
++ ap-perm
|
||||
|= [=spur diff=$-(gang gang)]
|
||||
^+ ap-core
|
||||
=- ap-core(sky.yoke -)
|
||||
%+ ~(put by sky.yoke) spur
|
||||
=/ old (~(gut by sky.yoke) spur *path-state)
|
||||
old(lyc (diff lyc.old))
|
||||
[`yon (lot:on-path fan.u.old `+(yon) ~)]
|
||||
:: +ap-from-internal: internal move to move.
|
||||
::
|
||||
:: We convert from cards to duct-indexed moves when resolving
|
||||
@ -1057,7 +1043,7 @@
|
||||
::
|
||||
+$ carp $+ carp (wind neet gift:agent)
|
||||
+$ neet $+ neet
|
||||
$< ?(%grow %tomb %cull %perm)
|
||||
$< ?(%grow %tomb %cull)
|
||||
$% note:agent
|
||||
[%agent [=ship name=term] task=[%raw-poke =mark =noun]]
|
||||
[%huck [=ship name=term] =note-arvo]
|
||||
@ -1742,7 +1728,6 @@
|
||||
[%pass * %grow *] $(caz t.caz, ap-core (ap-grow +.q.i.caz))
|
||||
[%pass * %tomb *] $(caz t.caz, ap-core (ap-tomb +.q.i.caz))
|
||||
[%pass * %cull *] $(caz t.caz, ap-core (ap-cull +.q.i.caz))
|
||||
[%pass * %perm *] $(caz t.caz, ap-core (ap-perm +.q.i.caz))
|
||||
[%pass * ?(%agent %arvo %pyre) *] $(caz t.caz, fex [i.caz fex])
|
||||
[%give *] $(caz t.caz, fex [i.caz fex])
|
||||
[%slip *] !!
|
||||
@ -2062,7 +2047,7 @@
|
||||
^- roon
|
||||
|= [lyc=gang care=term bem=beam]
|
||||
^- (unit (unit cage))
|
||||
=* ship p.bem
|
||||
=/ =shop &/p.bem
|
||||
=* dap q.bem
|
||||
=/ =coin $/r.bem
|
||||
=* path s.bem
|
||||
@ -2073,13 +2058,11 @@
|
||||
~
|
||||
::
|
||||
?: ?=(%a care)
|
||||
?. =(p.bem our) ~
|
||||
?. =(p.bem our) ~
|
||||
?~ yok=(~(get by yokes.state) q.bem) ~
|
||||
?: ?=(%nuke -.u.yok) ~
|
||||
?~ ski=(~(get by sky.u.yok) s.bem) ~
|
||||
?: ?& ?=(^ lyc.u.ski)
|
||||
!(~(has in u.lyc.u.ski) ship)
|
||||
== ~
|
||||
?: ?=(%nuke -.u.yok) ~
|
||||
=/ ski (~(get by sky.u.yok) s.bem)
|
||||
?~ ski ~
|
||||
=/ res=(unit (each page @uvI))
|
||||
?+ -.r.bem ~
|
||||
%ud (bind (get:on-path fan.u.ski p.r.bem) tail)
|
||||
@ -2096,30 +2079,28 @@
|
||||
?. ?=([~ %& *] res) ~
|
||||
``p.u.res(q !>(q.p.u.res))
|
||||
::
|
||||
?. ?=(%.y -.shop)
|
||||
~
|
||||
=/ =ship p.shop
|
||||
?: ?& =(%t care)
|
||||
=([%$ %da now] coin)
|
||||
=(our ship)
|
||||
==
|
||||
=/ yok (~(get by yokes.state) q.bem)
|
||||
?. ?=([~ %live *] yok) [~ ~]
|
||||
?. ?=([~ %live *] yok) ~
|
||||
:^ ~ ~ %file-list !> ^- (list ^path)
|
||||
%- ~(rep by sky.u.yok)
|
||||
|= [[=spur path-state] acc=(list spur)]
|
||||
?: ?& =(s.bem (scag (lent s.bem) spur))
|
||||
!=(s.bem spur)
|
||||
!=(~ fan)
|
||||
?| ?=(~ lyc)
|
||||
(~(has in u.lyc) ship)
|
||||
== ==
|
||||
[spur acc]
|
||||
acc
|
||||
%+ skim ~(tap in ~(key by sky.u.yok))
|
||||
|= =spur
|
||||
?& =(s.bem (scag (lent s.bem) spur))
|
||||
!=(s.bem spur)
|
||||
==
|
||||
::
|
||||
?: =(%z care)
|
||||
?: ?& =(%z care)
|
||||
=(our ship)
|
||||
==
|
||||
=/ yok (~(get by yokes.state) q.bem)
|
||||
?. ?=([~ %live *] yok) ~
|
||||
?~ ski=(~(get by sky.u.yok) s.bem) ~
|
||||
?: ?& ?=(^ lyc.u.ski)
|
||||
!(~(has in u.lyc.u.ski) ship)
|
||||
== ~
|
||||
=/ res=(unit (pair @da (each noun @uvI)))
|
||||
?+ -.r.bem ~
|
||||
%ud (get:on-path fan.u.ski p.r.bem)
|
||||
@ -2217,13 +2198,11 @@
|
||||
::
|
||||
?: ?& =(%w care)
|
||||
=([%$ %da now] coin)
|
||||
=(our ship)
|
||||
==
|
||||
=/ yok (~(get by yokes.state) q.bem)
|
||||
?. ?=([~ %live *] yok) [~ ~]
|
||||
?~ ski=(~(get by sky.u.yok) s.bem) [~ ~]
|
||||
?: ?& ?=(^ lyc.u.ski)
|
||||
!(~(has in u.lyc.u.ski) ship)
|
||||
== ~
|
||||
?~ las=(ram:on-path fan.u.ski) [~ ~]
|
||||
``case/!>(ud/key.u.las)
|
||||
::
|
||||
|
Loading…
Reference in New Issue
Block a user