scramble key names once revoked (#762)

This commit is contained in:
Echo 2026-01-03 09:12:04 -05:00 committed by GitHub
parent f406bec762
commit 5f45d9f7af
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -13,7 +13,10 @@ class AdminApiKey < ApplicationRecord
end
def revoke!
update!(revoked_at: Time.current)
update!(
revoked_at: Time.current,
name: "#{name}_revoked_#{SecureRandom.hex(8)}"
)
end
private