summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/gitano/admincommand.lua8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/gitano/admincommand.lua b/lib/gitano/admincommand.lua
index a89d4e9..0f2e4ee 100644
--- a/lib/gitano/admincommand.lua
+++ b/lib/gitano/admincommand.lua
@@ -476,6 +476,14 @@ local function builtin_group_run(conf, _, cmdline, env)
elseif cmdline[4] ~= token then
log.fatal("Token does not match. Has someone else done administrative actions?")
else
+ for gg, gtab in pairs(conf.groups) do
+ if gtab.subgroups[g] then
+ table.remove(gtab.subgroups, gtab.subgroups[g])
+ gtab.subgroups[g] = nil
+ gtab.changed_tables()
+ log.state("Removed:", g, "from subgroup membership of", gg)
+ end
+ end
conf.groups[g] = nil
reason = "Delete group " .. g
end