mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-11-29 04:04:02 +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
|
++ 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
|
++ prompt
|
||||||
^- sole-prompt
|
^- sole-prompt
|
||||||
?~ wom [& %ask-ship ":womb-ship? ~"]
|
?~ wom [& %ask-ship ":womb-ship? ~"]
|
||||||
@ -25,7 +30,7 @@
|
|||||||
|= path
|
|= path
|
||||||
^- (quip {bone card} +>)
|
^- (quip {bone card} +>)
|
||||||
~| [%not-in-whitelist src.bow]
|
~| [%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))
|
:_ +>.$(sos (~(put by sos) ost.bow *sole-share))
|
||||||
=- [(effect %mor pro+prompt -)]~
|
=- [(effect %mor pro+prompt -)]~
|
||||||
=+ all=adrs
|
=+ all=adrs
|
||||||
@ -56,6 +61,11 @@
|
|||||||
;~(plug (cook crip (star next)) (easy ~))
|
;~(plug (cook crip (star next)) (easy ~))
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
|
++ poke-ask-admins
|
||||||
|
|= a/(set ship)
|
||||||
|
?> =(our.bow src.bow)
|
||||||
|
`+>.$(admins a)
|
||||||
|
::
|
||||||
++ poke-ask-mail
|
++ poke-ask-mail
|
||||||
|= ask/@t
|
|= ask/@t
|
||||||
^- (quip {bone card} +>)
|
^- (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