Major improvements on policy configuration

- Bugfixes on change_policy
- Replaced _consent modules with configurable modules
This commit is contained in:
Nathan Schneider
2022-08-09 17:00:24 -06:00
parent 78ea89559f
commit 22a2048d5a
21 changed files with 253 additions and 379 deletions

View File

@ -1,11 +1,10 @@
--- change_modules
-- Depends on consent
-- @module change_modules
local change_modules = {
name = "Change modules (consent)",
name = "Change modules",
slug = "change_modules",
desc = "Add or remove modules from the org with member consent",
desc = "Add or remove modules from the org",
hide = false;
}
@ -17,6 +16,7 @@ change_modules.data = {
}
change_modules.config = {
approval_module = false
}
--- Initiate change in modules.
@ -68,7 +68,7 @@ function change_modules:initiate(result)
self.org:delete_process(self.id)
return
end
-- proceed with consent
-- proceed with approval
local query = "Accept module changes in org "..
self.org.name.."?"
self.data.summary = ""
@ -80,11 +80,10 @@ function change_modules:initiate(result)
table.concat(self.data.remove_modules,", ")
end
self:call_module(
"consent",
self.config.approval_module,
self.initiator,
{
prompt = query..self.data.summary,
votes_required = #self.org.members
prompt = query..self.data.summary
},
function()
self:implement_change()