FEATURE: Promote the "delete group" staff action log. (#16656)

We used to log group deletion as custom, which means we can't later search for them. Include group ID in the details.
This commit is contained in:
Roman Rizzi
2022-05-09 12:12:52 -03:00
committed by GitHub
parent 54759b7e8c
commit 6bdcd7afb2
5 changed files with 39 additions and 5 deletions

View File

@ -45,10 +45,8 @@ class Admin::GroupsController < Admin::AdminController
if group.automatic
can_not_modify_automatic
else
details = { name: group.name }
details[:grant_trust_level] = group.grant_trust_level if group.grant_trust_level
StaffActionLogger.new(current_user).log_group_deletetion(group)
StaffActionLogger.new(current_user).log_custom('delete_group', details)
group.destroy!
render json: success_json
end