-
-
Notifications
You must be signed in to change notification settings - Fork 238
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
feature: audit logs #2703
base: main
Are you sure you want to change the base?
feature: audit logs #2703
Conversation
Code Climate has analyzed commit 6ecaf15 and detected 0 issues on this pull request. View more on Code Climate. |
lib/avo/configuration.rb
Outdated
@@ -160,7 +162,9 @@ def license=(value) | |||
def license | |||
gems = Gem::Specification.map {|gem| gem.name} | |||
|
|||
@license ||= if gems.include?("avo-advanced") | |||
@license ||= if gems.include?("avo-audits") | |||
"enterprise" |
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.
Why? 😢
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.
Can you consider moving the audit feature to the advanced plan?
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.
Hey @yorsant.
Apologies for the late reply.
The audit logging feature is, generally speaking, an enterprise feature.
As much as we want to give features away or make them cheaper, we can't do that. It takes a lot of time and effort to build Avo.
We love the self-serve product (Pro, Advanced) but the reality is that we can't survive and improve our business without having some big customers. We've heard from customers that they saved tens and even hundreds of thousands of dollars by using Avo and that they would like to pay more.
If we don't have any Enterprise features, we can't sell Enterprise subscriptions.
This all comes back to us being able to build a robust business and being able to ship more value through our products.
Thanks for asking the question.
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.
FWIW you can build audit log yourself using papertrail and avo resources.
This PR has been marked as stale because there was no activity for the past 15 days. |
@@ -25,6 +25,7 @@ class ApplicationController < ::ActionController::Base | |||
before_action :set_view | |||
before_action :set_sidebar_open | |||
before_action :set_stylesheet_assets_path | |||
before_action :set_paper_trail_whodunnit, if: -> { defined? PaperTrail } |
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.
Can't we add this ourselves in the audit logging gem?
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.
Makes sense, done
@@ -100,6 +100,9 @@ Avo.configure do |config| | |||
# file_logger | |||
# } | |||
|
|||
## == Audit == | |||
# config.audit = false |
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.
Let's think about the configuration of this gem a bit more. true/false is a bit terse and we'll for sure have more configs on that gem.
How about moving this config as config.enabled = true|false
on that gem's configuration?
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.
How about moving this config as
config.enabled = true|false
on that gem's configuration?
Well, that's a really good idea to have a configuration file for each gem!
lib/avo/configuration.rb
Outdated
true | ||
end | ||
|
||
def audit? |
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.
I don't see where we use this method, probably in the gem itself?
If so, how about moving it there so there's little noise about it here?
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.
Yes, I'm moving the audit configuration to the gem and will revert this change, thanks for pointing it
lib/avo/configuration.rb
Outdated
@@ -172,7 +174,9 @@ def license=(value) | |||
def license | |||
gems = Gem::Specification.map {|gem| gem.name} | |||
|
|||
@license ||= if gems.include?("avo-advanced") | |||
@license ||= if gems.include?("avo-audit_logging") | |||
"enterprise" |
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.
This feature will not be bundled in a gem, so let's not force the license to enterprise.
@@ -570,10 +582,6 @@ def set_pagy_locale | |||
@pagy_locale = locale.to_s || Avo.configuration.default_locale || "en" | |||
end | |||
|
|||
def safe_call(method) |
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.
Don't we need this? And shouldn't it take more args?
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.
I guess you missed this change https://github.com/avo-hq/avo/pull/2703/files#diff-27ec89c6677b158fe3a800b268c9c196b5409f439315240504626f4c8bf81bc7R140
The method was extracted to be accessible in more places
Description
Fixes #1328
Docs avo-hq/docs.avohq.io#292
Audit logging calls.
Checklist: