Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

various: add resource-id-ing ~| into common paths #3683

Merged
merged 1 commit into from
Jun 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions desk/app/channels-server.hoon
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,8 @@
++ watch
|= =(pole knot)
^+ cor
?+ pole ~|(bad-watch-path+pole !!)
~| watch-path=`path`pole
?+ pole ~|(%bad-watch-path !!)
[=kind:c name=@ %create ~]
?> =(our src):bowl
=* nest [kind.pole our.bowl name.pole]
Expand All @@ -288,7 +289,8 @@
::
[=kind:c name=@ %updates ~]
=/ ca (ca-abed:ca-core kind.pole our.bowl name.pole)
?> (can-read:ca-perms:ca src.bowl)
?. (can-read:ca-perms:ca src.bowl)
~|(%permission-denied !!)
cor
::
[=kind:c name=@ %updates after=@ ~]
Expand Down Expand Up @@ -425,6 +427,7 @@
::
++ ca-abed
|= n=nest:c
~| nest=n
ca-core(nest n, channel (~(got by v-channels) n))
::
++ ca-area `path`/[kind.nest]/[name.nest]
Expand All @@ -436,15 +439,17 @@
++ ca-watch-updates
|= =@da
^+ ca-core
?> (can-read:ca-perms src.bowl)
?. (can-read:ca-perms src.bowl)
~|(%permission-denied !!)
=/ =log:c (lot:log-on:c log.channel `da ~)
=. ca-core (give %fact ~ %channel-logs !>(log))
ca-core
::
++ ca-watch-checkpoint
|= [from=@da to=(unit @da)]
^+ ca-core
?> (can-read:ca-perms src.bowl)
?. (can-read:ca-perms src.bowl)
~|(%permission-denied !!)
=/ posts=v-posts:c (lot:on-v-posts:c posts.channel `from to)
=/ chk=u-checkpoint:c -.channel(posts posts)
=. ca-core (give %fact ~ %channel-checkpoint !>(chk))
Expand All @@ -453,7 +458,8 @@
++ ca-watch-checkpoint-page
|= n=@
^+ ca-core
?> (can-read:ca-perms src.bowl)
?. (can-read:ca-perms src.bowl)
~|(%permission-denied !!)
=/ posts=v-posts:c (gas:on-v-posts:c *v-posts:c (bat:mo-v-posts:c posts.channel ~ n))
=/ chk=u-checkpoint:c -.channel(posts posts)
=. ca-core (give %fact ~ %channel-checkpoint !>(chk))
Expand Down
4 changes: 3 additions & 1 deletion desk/app/groups.hoon
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,8 @@
++ watch
|= =(pole knot)
^+ cor
?+ pole ~|(bad-watch/pole !!)
~| watch-path=`path`pole
?+ pole ~|(%bad-watch-path !!)
[%init ~] (give %kick ~ ~)
[%groups ~] cor
[%groups %ui ~] cor
Expand Down Expand Up @@ -799,6 +800,7 @@
++ go-abed
|= f=flag:g
^+ go-core
~| flag=f
=/ [n=net:g gr=group:g] (~(got by groups) f)
go-core(flag f, group gr, net n)
::
Expand Down