From 72a10b58bed86df81e29271108a20617d10a1a73 Mon Sep 17 00:00:00 2001 From: Monica Cellio Date: Mon, 10 Aug 2026 19:36:03 -0400 Subject: [PATCH] add entry in audit log for automatic ability grants --- app/models/community_user.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/models/community_user.rb b/app/models/community_user.rb index 8997ee350..6cec7d81b 100644 --- a/app/models/community_user.rb +++ b/app/models/community_user.rb @@ -124,6 +124,10 @@ def recalc_privilege!(internal_id, sandbox: false) # If not sandbox mode, create new privilege entry grant_privilege!(internal_id) unless sandbox recalc_trust_level unless sandbox + + AuditLog.admin_audit(event_type: 'ability_grant', related: user, + user: User.system, + comment: priv.name) true end