Rename audit log feature flag config variable
This commit is contained in:
@@ -150,9 +150,7 @@ def set_default_headers(app): # pragma: no cover
|
||||
def map_config(config):
|
||||
return {
|
||||
**config["default"],
|
||||
"AUDIT_LOG_FEATURE_TOGGLE": config["default"].getboolean(
|
||||
"AUDIT_LOG_FEATURE_TOGGLE"
|
||||
),
|
||||
"USE_AUDIT_LOG": config["default"].getboolean("USE_AUDIT_LOG"),
|
||||
"ENV": config["default"]["ENVIRONMENT"],
|
||||
"BROKER_URL": config["default"]["REDIS_URI"],
|
||||
"DEBUG": config["default"].getboolean("DEBUG"),
|
||||
|
@@ -37,7 +37,7 @@ class AuditableMixin(object):
|
||||
},
|
||||
)
|
||||
|
||||
if app.config.get("AUDIT_LOG_FEATURE_TOGGLE", False):
|
||||
if app.config.get("USE_AUDIT_LOG", False):
|
||||
audit_event = AuditEvent(**log_data)
|
||||
audit_event.save(connection)
|
||||
|
||||
|
@@ -24,7 +24,7 @@ bp.context_processor(atat_context_processor)
|
||||
@bp.route("/activity-history")
|
||||
@user_can(Permissions.VIEW_AUDIT_LOG, message="view activity log")
|
||||
def activity_history():
|
||||
if app.config.get("AUDIT_LOG_FEATURE_TOGGLE", False):
|
||||
if app.config.get("USE_AUDIT_LOG", False):
|
||||
pagination_opts = Paginator.get_pagination_opts(request)
|
||||
audit_events = AuditLog.get_all_events(pagination_opts)
|
||||
return render_template("audit_log/audit_log.html", audit_events=audit_events)
|
||||
|
Reference in New Issue
Block a user