Made approval on remove_process configurable

This commit is contained in:
Nathan Schneider
2022-08-13 16:34:03 -06:00
parent 9b27ac145c
commit 4337e5511b

View File

@@ -4,7 +4,7 @@
local remove_process = { local remove_process = {
name = "Remove process", name = "Remove process",
slug = "remove_process", slug = "remove_process",
desc = "User can remove own processes, consent required for those of others", desc = "User can remove own processes, approval required for those of others",
hide = false; hide = false;
} }
@@ -12,6 +12,7 @@ remove_process.data = {
} }
remove_process.config = { remove_process.config = {
approval_module = "consent"
} }
--- Initiate function --- Initiate function
@@ -71,11 +72,12 @@ function remove_process:initiate(result)
self.org:delete_process(self.id) self.org:delete_process(self.id)
else else
self:call_module( self:call_module(
"consent", approval_module,
self.initiator, self.initiator,
{ {
prompt = "Approve removal of process "..process_choice.."?", prompt =
votes_required = #self.org.members "Approve removal of process "
..process_choice.."?"
}, },
function(input) function(input)
modpol.interactions.message_org( modpol.interactions.message_org(