FEATURE: Log when a group is deleted. (#11706)

We include the group "name" and "granted_trust_level" attributes.
This commit is contained in:
Roman Rizzi
2021-01-13 15:53:18 -03:00
committed by GitHub
parent bd7cbcd8f8
commit 1ad378f5c5
3 changed files with 26 additions and 0 deletions

View File

@ -80,6 +80,10 @@ 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_custom('delete_group', details)
group.destroy!
render json: success_json
end