Draft: Resolve "Audit Events: Log feature flag change if actor is present"
requested to merge 378075-audit-events-log-feature-flag-enable-disable-if-actor-is-present into master
CLOSED: See !105631 (closed)
What does this MR do and why?
Creates audit events for feature flag changes initiated from Rails console or Ruby scripts.
How to set up and validate locally
- In Rails console, enable or disable any feature using
Feature.enable(feature, actor)
orFeature.enable(feature, actor)
.actor
is any User, Group or Project. - Check audit events in local instance for Rails Console record.
- Verify that calling enable/disable without passing an actor does not generate an audit event.
Outstanding issues
The target of the audit event is currently undefined. Feature::FlipperGate
is created on feature enable but is not exposed by Flipper itself. Is there a better way to query for it, or another object that can be used as target?
Other questions:
- Does the new audit event type belong in root or EE config?
TODO:
-
Add specs -
Update docs
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #378075
Edited by Aaron Huntsman