diff --git a/pkg/arvo/app/chat-cli.hoon b/pkg/arvo/app/chat-cli.hoon index 5a45ed9cff..4090fd7006 100644 --- a/pkg/arvo/app/chat-cli.hoon +++ b/pkg/arvo/app/chat-cli.hoon @@ -41,7 +41,7 @@ :: :: :: create chat - [%create chat-security path (unit glyph) (unit ?)] + [%create rw-security path (unit glyph) (unit ?)] [%delete path] :: delete chat [%invite ?(%r %w %rw) path (set ship)] :: allow [%banish ?(%r %w %rw) path (set ship)] :: disallow @@ -611,7 +611,7 @@ :: +create: new local mailbox :: ++ create - |= [security=chat-security =path gyf=(unit char) allow-history=(unit ?)] + |= [security=rw-security =path gyf=(unit char) allow-history=(unit ?)] ^- (quip move _this) ::TODO check if already exists =/ =target [our-self path] diff --git a/pkg/arvo/app/chat-hook.hoon b/pkg/arvo/app/chat-hook.hoon index 14e0776f07..c67a38316b 100644 --- a/pkg/arvo/app/chat-hook.hoon +++ b/pkg/arvo/app/chat-hook.hoon @@ -419,7 +419,7 @@ [ost.bol %poke / [our.bol %invite-store] [%invite-action act]] :: ++ create-permission - |= [pax=path sec=chat-security] + |= [pax=path sec=rw-security] ^- (list move) =/ read-perm (weld pax /read) =/ write-perm (weld pax /write) diff --git a/pkg/arvo/app/chat-view.hoon b/pkg/arvo/app/chat-view.hoon index 45c1b75dc4..ffc78d1301 100644 --- a/pkg/arvo/app/chat-view.hoon +++ b/pkg/arvo/app/chat-view.hoon @@ -279,7 +279,7 @@ .^(chat-configs %gx /=chat-store/(scot %da now.bol)/configs/noun) :: ++ create-security - |= [pax=path sec=chat-security] + |= [pax=path sec=rw-security] ^- (list move) =/ read (weld pax /read) =/ write (weld pax /write) diff --git a/pkg/arvo/lib/chat-json.hoon b/pkg/arvo/lib/chat-json.hoon index 84a3e8f9a0..10ed87411c 100644 --- a/pkg/arvo/lib/chat-json.hoon +++ b/pkg/arvo/lib/chat-json.hoon @@ -256,7 +256,7 @@ :: ++ sec =, dejs:format - ^- $-(json chat-security) + ^- $-(json rw-security) (su (perk %channel %village %journal %mailbox ~)) -- -- diff --git a/pkg/arvo/mar/chat/hook-action.hoon b/pkg/arvo/mar/chat/hook-action.hoon index 9d3adf8a8e..6ae4d43747 100644 --- a/pkg/arvo/mar/chat/hook-action.hoon +++ b/pkg/arvo/mar/chat/hook-action.hoon @@ -31,7 +31,7 @@ == :: ++ sec - ^- $-(^json chat-security) + ^- $-(^json rw-security) (su (perk %channel %village %journal %mailbox ~)) :: -- diff --git a/pkg/arvo/sur/chat-hook.hoon b/pkg/arvo/sur/chat-hook.hoon index bc44c3b129..d1c264f5aa 100644 --- a/pkg/arvo/sur/chat-hook.hoon +++ b/pkg/arvo/sur/chat-hook.hoon @@ -1,16 +1,10 @@ +/- *rw-security |% -+$ chat-security - $? $channel :: black r, black w - $village :: white r, white w - $journal :: black r, white w - $mailbox :: white r, black w - == -:: +$ chat-hook-action $% :: %add-owned: make a chatroom accessible to foreign ships - :: specified by the chat-security model + :: specified by the rw-security model :: - [%add-owned =path security=chat-security allow-history=?] + [%add-owned =path security=rw-security allow-history=?] :: %add-synced: mirror a foreign chatroom to our chat-store :: [%add-synced =ship =path ask-history=?] diff --git a/pkg/arvo/sur/chat-view.hoon b/pkg/arvo/sur/chat-view.hoon index 17cd6eb8ec..aca2bbee4d 100644 --- a/pkg/arvo/sur/chat-view.hoon +++ b/pkg/arvo/sur/chat-view.hoon @@ -1,15 +1,9 @@ +/- *rw-security |% -+$ chat-security - $? $channel :: black r, black w - $village :: white r, white w - $journal :: black r, white w - $mailbox :: white r, black w - == -:: +$ chat-view-action $% $: %create =path - security=chat-security + security=rw-security read=(set ship) write=(set ship) allow-history=? diff --git a/pkg/arvo/sur/rw-security.hoon b/pkg/arvo/sur/rw-security.hoon new file mode 100644 index 0000000000..477370c001 --- /dev/null +++ b/pkg/arvo/sur/rw-security.hoon @@ -0,0 +1,8 @@ +|% ++$ rw-security + $? $channel :: black r, black w + $village :: white r, white w + $journal :: black r, white w + $mailbox :: white r, black w + == +--