mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-11-28 19:55:53 +03:00
add :ask|admins dynamic permissions
This commit is contained in:
parent
98fe86fb49
commit
b26ee30990
14
app/ask.hoon
14
app/ask.hoon
@ -13,7 +13,12 @@
|
||||
++ email @t
|
||||
--
|
||||
!:
|
||||
|_ {bow/bowl adr/(map email {time invited}) sos/(map bone sole-share) wom/(unit ship)}
|
||||
|_ $: bow/bowl
|
||||
adr/(map email {time invited})
|
||||
sos/(map bone sole-share)
|
||||
wom/(unit ship)
|
||||
admins/(set ship)
|
||||
==
|
||||
++ prompt
|
||||
^- sole-prompt
|
||||
?~ wom [& %ask-ship ":womb-ship? ~"]
|
||||
@ -25,7 +30,7 @@
|
||||
|= path
|
||||
^- (quip {bone card} +>)
|
||||
~| [%not-in-whitelist src.bow]
|
||||
?> (~(has in (sy ~zod our.bow ~wisdyr-holpeg ~)) src.bow)
|
||||
?> |((~(has in admins) src.bow) =(our.bow src.bow))
|
||||
:_ +>.$(sos (~(put by sos) ost.bow *sole-share))
|
||||
=- [(effect %mor pro+prompt -)]~
|
||||
=+ all=adrs
|
||||
@ -56,6 +61,11 @@
|
||||
;~(plug (cook crip (star next)) (easy ~))
|
||||
==
|
||||
::
|
||||
++ poke-ask-admins
|
||||
|= a/(set ship)
|
||||
?> =(our.bow src.bow)
|
||||
`+>.$(admins a)
|
||||
::
|
||||
++ poke-ask-mail
|
||||
|= ask/@t
|
||||
^- (quip {bone card} +>)
|
||||
|
14
gen/ask/admins.hoon
Normal file
14
gen/ask/admins.hoon
Normal file
@ -0,0 +1,14 @@
|
||||
::
|
||||
:::: /hoon/release/hood/gen
|
||||
::
|
||||
/? 310
|
||||
::
|
||||
::::
|
||||
!:
|
||||
:- %say
|
||||
|= $: {now/@da eny/@uvJ bec/beak}
|
||||
{who/(list ship) $~}
|
||||
==
|
||||
:- %ask-admins ^- (set ship)
|
||||
~? =(~ who) %admins-unset
|
||||
(silt who)
|
Loading…
Reference in New Issue
Block a user