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/05 21:28:22 UTC
[allura] branch dw/8451 updated (76afd5b86 -> 77babfc8a)
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 76afd5b86 [#8451] record forum add/delete in audit log
new 6b854e389 [#8451] record tool renames in audit log
new 77babfc8a [#8451] record wiki set homepage and update 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:
Allura/allura/app.py | 5 +++++
ForgeWiki/forgewiki/wiki_main.py | 31 +++++++++++++++++++++++++++----
2 files changed, 32 insertions(+), 4 deletions(-)
[allura] 02/02: [#8451] record wiki set homepage and update 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 77babfc8a20bc376dacb0da19466b86cc16d51fb
Author: Dillon Walls <di...@slashdotmedia.com>
AuthorDate: Fri Aug 5 21:28:16 2022 +0000
[#8451] record wiki set homepage and update options in audit log
---
ForgeWiki/forgewiki/wiki_main.py | 31 +++++++++++++++++++++++++++----
1 file changed, 27 insertions(+), 4 deletions(-)
diff --git a/ForgeWiki/forgewiki/wiki_main.py b/ForgeWiki/forgewiki/wiki_main.py
index 6648e7c13..f993f311e 100644
--- a/ForgeWiki/forgewiki/wiki_main.py
+++ b/ForgeWiki/forgewiki/wiki_main.py
@@ -932,12 +932,17 @@ class WikiAdminController(DefaultAdminController):
@expose()
@require_post()
def set_home(self, new_home):
+ old_home = self.app.root_page_name
self.app.root_page_name = new_home
self.app.upsert_root(new_home)
flash('Home updated')
mount_base = c.project.url() + \
self.app.config.options.mount_point + '/'
url = h.really_unicode(mount_base) + h.really_unicode(new_home) + '/'
+ M.AuditLog.log('set home page: "{}" => "{}" for {}'.format(
+ old_home,
+ new_home,
+ self.app.config.options['mount_point']))
redirect(h.urlquote(url))
@without_trailing_slash
@@ -945,9 +950,27 @@ class WikiAdminController(DefaultAdminController):
@require_post()
def set_options(self, show_discussion=False, show_left_bar=False, show_right_bar=False,
allow_email_posting=False):
- self.app.show_discussion = show_discussion
- self.app.show_left_bar = show_left_bar
- self.app.show_right_bar = show_right_bar
- self.app.allow_email_posting = allow_email_posting
+ mount_point = self.app.config.options['mount_point']
+
+ if self.app.show_discussion != bool(show_discussion):
+ M.AuditLog.log('{} set option "{}": {} => {}'.format(
+ mount_point, "Show Discussion", self.app.show_discussion, bool(show_discussion)))
+ self.app.show_discussion = show_discussion
+
+ if self.app.show_left_bar != bool(show_left_bar):
+ M.AuditLog.log('{} set option "{}": {} => {}'.format(
+ mount_point, "Show left Bar", self.app.show_left_bar, bool(show_left_bar)))
+ self.app.show_left_bar = show_left_bar
+
+ if self.app.show_right_bar != bool(show_right_bar):
+ M.AuditLog.log('{} set option "{}": {} => {}'.format(
+ mount_point, "Show metadata", self.app.show_right_bar, bool(show_right_bar)))
+ self.app.show_right_bar = show_right_bar
+
+ if self.app.allow_email_posting != bool(allow_email_posting):
+ M.AuditLog.log('{} set option "{}": {} => {}'.format(
+ mount_point, "Allow posting replies via email", self.app.allow_email_posting, bool(allow_email_posting)))
+ self.app.allow_email_posting = allow_email_posting
+
flash('Wiki options updated')
redirect(six.ensure_text(request.referer or '/'))
[allura] 01/02: [#8451] record tool renames 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 6b854e3893432518333b81e2823999aee42457af
Author: Dillon Walls <di...@slashdotmedia.com>
AuthorDate: Fri Aug 5 21:03:18 2022 +0000
[#8451] record tool renames in audit log
---
Allura/allura/app.py | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/Allura/allura/app.py b/Allura/allura/app.py
index fef1e6e37..ef66c7ba2 100644
--- a/Allura/allura/app.py
+++ b/Allura/allura/app.py
@@ -944,7 +944,12 @@ class DefaultAdminController(BaseController, AdminControllerMixin):
"""
require_access(self.app, 'configure')
+ old_label = self.app.config.options['mount_label']
self.app.config.options['mount_label'] = mount_label
+ model.AuditLog.log('updated label: "{}" => "{}" for {}'.format(
+ old_label,
+ mount_label,
+ self.app.config.options['mount_point']))
g.post_event('project_menu_updated')
redirect(six.ensure_text(request.referer or '/'))