You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by gc...@apache.org on 2022/09/02 17:43:03 UTC
[allura] 02/06: [#8458] audit log - log general tool POST /configure options to audit log
This is an automated email from the ASF dual-hosted git repository.
gcruz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/allura.git
commit 384e845836d333f6590e91adfe2fb3c5c71c38fe
Author: Dillon Walls <di...@slashdotmedia.com>
AuthorDate: Wed Aug 31 21:00:54 2022 +0000
[#8458] audit log - log general tool POST /configure options to audit log
---
Allura/allura/app.py | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/Allura/allura/app.py b/Allura/allura/app.py
index 49145ab2e..83ea1c94b 100644
--- a/Allura/allura/app.py
+++ b/Allura/allura/app.py
@@ -996,6 +996,13 @@ class DefaultAdminController(BaseController, AdminControllerMixin):
except fev.Invalid as e:
flash(f'{opt.name}: {str(e)}', 'error')
continue
+ if self.app.config.options[opt.name] != val:
+ M.AuditLog.log('{}: set option "{}" {} => {}'.format(
+ self.app.config.options['mount_point'],
+ opt.name,
+ self.app.config.options[opt.name],
+ val
+ ))
self.app.config.options[opt.name] = val
if is_admin:
# possibly moving admin mount point