-
Notifications
You must be signed in to change notification settings - Fork 688
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New configurable settings: encryption for audited_changes & filtering encrypted attrs #694
base: main
Are you sure you want to change the base?
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -55,6 +55,10 @@ class Audit < ::ActiveRecord::Base | |
serialize :audited_changes, YAMLIfTextColumnType | ||
end | ||
|
||
if Rails.gem_version >= Gem::Version.new("7.0") && Audited.encrypt_audited_changes | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This doesn't seem to work as expected, it appears that this is evaluated before the |
||
encrypts :audited_changes | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is it necessary to take into account the deterministic encryption? |
||
end | ||
|
||
scope :ascending, -> { reorder(version: :asc) } | ||
scope :descending, -> { reorder(version: :desc) } | ||
scope :creates, -> { where(action: "create") } | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe another header here to show that these are separate features?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm, because we use
encrypts
, this config is also available only from Rails 7 ... so I grouped it under the same headershould I add a sub-header?