You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by di...@apache.org on 2022/08/18 22:38:37 UTC

[allura] branch dw/8451 updated (8b7a94830 -> f42bc80db)

This is an automated email from the ASF dual-hosted git repository.

dill0wn pushed a change to branch dw/8451
in repository https://gitbox.apache.org/repos/asf/allura.git


    from 8b7a94830 [#8451] log repo external url, other options, and SVN import in audit log
     new 718dd1ead fixup! [#8451] log ticket options in audit log
     new f42bc80db fixup! [#8451] log blog options in audit log

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 ForgeBlog/forgeblog/main.py               | 10 ++++++----
 ForgeTracker/forgetracker/tracker_main.py |  4 ++--
 2 files changed, 8 insertions(+), 6 deletions(-)


[allura] 02/02: fixup! [#8451] log blog options in audit log

Posted by di...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

dill0wn pushed a commit to branch dw/8451
in repository https://gitbox.apache.org/repos/asf/allura.git

commit f42bc80dbc1e507726a8de87b52267048c145273
Author: Dillon Walls <di...@slashdotmedia.com>
AuthorDate: Thu Aug 18 22:36:06 2022 +0000

    fixup! [#8451] log blog options in audit log
---
 ForgeBlog/forgeblog/main.py | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/ForgeBlog/forgeblog/main.py b/ForgeBlog/forgeblog/main.py
index 7a7b98843..59fe8e869 100644
--- a/ForgeBlog/forgeblog/main.py
+++ b/ForgeBlog/forgeblog/main.py
@@ -537,14 +537,16 @@ class BlogAdminController(DefaultAdminController):
     def set_options(self, show_discussion=False, allow_email_posting=False):
         mount_point = self.app.config.options['mount_point']
 
-        if self.app.config.options['show_discussion'] != bool(show_discussion):
+        if self.app.config.options.get('show_discussion') != bool(show_discussion):
             M.AuditLog.log('{}: set option "{}" {} => {}'.format(
-                mount_point, "show_discussion", self.app.config.options['show_discussion'], bool(show_discussion)))
+                mount_point, "show_discussion", self.app.config.options.get('show_discussion'),
+                bool(show_discussion)))
             self.app.config.options['show_discussion'] = bool(show_discussion)
 
-        if self.app.config.options['AllowEmailPosting'] != bool(allow_email_posting):
+        if self.app.config.options.get('AllowEmailPosting') != bool(allow_email_posting):
             M.AuditLog.log('{}: set option "{}" {} => {}'.format(
-                mount_point, "AllowEmailPosting", self.app.config.options['AllowEmailPosting'], bool(allow_email_posting)))
+                mount_point, "AllowEmailPosting", self.app.config.options.get('AllowEmailPosting'),
+                bool(allow_email_posting)))
             self.app.config.options['AllowEmailPosting'] = bool(allow_email_posting)
 
         flash('Blog options updated')


[allura] 01/02: fixup! [#8451] log ticket options in audit log

Posted by di...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

dill0wn pushed a commit to branch dw/8451
in repository https://gitbox.apache.org/repos/asf/allura.git

commit 718dd1ead4ab1505ec795afdbf0710e108768927
Author: Dillon Walls <di...@slashdotmedia.com>
AuthorDate: Thu Aug 18 22:32:42 2022 +0000

    fixup! [#8451] log ticket options in audit log
---
 ForgeTracker/forgetracker/tracker_main.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/ForgeTracker/forgetracker/tracker_main.py b/ForgeTracker/forgetracker/tracker_main.py
index 8f9dff0d4..2ead3dac3 100644
--- a/ForgeTracker/forgetracker/tracker_main.py
+++ b/ForgeTracker/forgetracker/tracker_main.py
@@ -1706,9 +1706,9 @@ class TrackerAdminController(DefaultAdminController):
         require_access(self.app, 'configure')
         mount_point = self.app.config.options['mount_point']
         for k, val in kw.items():
-            if self.app.config.options[k] != val:
+            if self.app.config.options.get(k) != val:
                 M.AuditLog.log('{}: set option "{}" {} => {}'.format(
-                    mount_point, k, self.app.config.options[k], bool(val)))
+                    mount_point, k, self.app.config.options.get(k), bool(val)))
                 self.app.config.options[k] = val
         flash('Options updated')
         redirect(six.ensure_text(request.referer or '/'))