mirror of
https://github.com/urbit/shrub.git
synced 2024-12-25 13:04:17 +03:00
sur: added rw-security to replace chat-security
This commit is contained in:
parent
9cacb12dbc
commit
dcde20c86c
@ -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]
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -256,7 +256,7 @@
|
||||
::
|
||||
++ sec
|
||||
=, dejs:format
|
||||
^- $-(json chat-security)
|
||||
^- $-(json rw-security)
|
||||
(su (perk %channel %village %journal %mailbox ~))
|
||||
--
|
||||
--
|
||||
|
@ -31,7 +31,7 @@
|
||||
==
|
||||
::
|
||||
++ sec
|
||||
^- $-(^json chat-security)
|
||||
^- $-(^json rw-security)
|
||||
(su (perk %channel %village %journal %mailbox ~))
|
||||
::
|
||||
--
|
||||
|
@ -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=?]
|
||||
|
@ -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=?
|
||||
|
8
pkg/arvo/sur/rw-security.hoon
Normal file
8
pkg/arvo/sur/rw-security.hoon
Normal 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
|
||||
==
|
||||
--
|
Loading…
Reference in New Issue
Block a user