sur: added rw-security to replace chat-security

This commit is contained in:
Logan Allen 2019-11-13 17:17:24 -08:00
parent 9cacb12dbc
commit dcde20c86c
8 changed files with 19 additions and 23 deletions

View File

@ -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]

View File

@ -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)

View File

@ -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)

View File

@ -256,7 +256,7 @@
::
++ sec
=, dejs:format
^- $-(json chat-security)
^- $-(json rw-security)
(su (perk %channel %village %journal %mailbox ~))
--
--

View File

@ -31,7 +31,7 @@
==
::
++ sec
^- $-(^json chat-security)
^- $-(^json rw-security)
(su (perk %channel %village %journal %mailbox ~))
::
--

View File

@ -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=?]

View File

@ -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=?

View File

@ -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
==
--