Update references for NOTIFICATION_EMAIL
authorStephen Frost <sfrost@snowman.net>
Mon, 24 Sep 2018 14:04:49 +0000 (10:04 -0400)
committerStephen Frost <sfrost@snowman.net>
Mon, 24 Sep 2018 14:04:49 +0000 (10:04 -0400)
This updates various references to use NOTIFICATION_EMAIL, since that's
what we actually send the emails too.

Also change the moderators group to be 'pgweb moderators'.

docs/batch.rst
docs/django.rst
pgweb/core/management/commands/moderation_report.py
pgweb/core/views.py

index 47f9e31487213ab592d0b24e7fa63212fa893c8d..990f518d10d041dea2b2fc76e65f1662e0bb9f5a 100644 (file)
@@ -31,8 +31,8 @@ are defined in settings.FTP_MASTERS.
 moderation/moderation_report.py
 -------------------------------
 This script enumerates all unmoderated objects in the database and
-generates an email to the slaves list if there are any pending, to
-prod the moderators to do their job.
+generates an email to the NOTIFICATION_EMAIL address if there are any
+pending, to prod the moderators to do their job.
 
 rss/fetch_rss_feeds.py
 ----------------------
index 2d893edf24e7909f68104a7c62bc8ede1f312e29..f2c4d39b46b745874f2cd7e4bf2984aabb6708d6 100644 (file)
@@ -41,8 +41,8 @@ Forms
 here are some special things to consider when dealing with forms. For
 any objects that are going to be moderated, the Model that is used
 should set the send_notification attribute to True. This will cause
-the system to automatically send out notifications to the slaves list
-whenever a new object is created or an existing one is modified.
+the system to automatically send out notifications to the NOTIFICATION_EMAIL
+address whenever a new object is created or an existing one is modified.
 
 If the form contains any text fields that accept markdown, the
 attribute markdown_fields should be set to a tuple containing a list
index de45337092f899a0d393db8c15191e2a91cd6209..edd0bc7c480123a5152664b9d94924fbbced7cc3 100644 (file)
@@ -1,6 +1,7 @@
 #!/usr/bin/env python
 #
-# Script to send daily moderation report to web slaves
+# Script to send daily moderation report to the NOTIFICATION_EMAIL address
+# (the moderators list)
 #
 #
 
index 8b0784e6c1cedfb6f23c5f99c1b55bd3cf2a0349..a94c9f07130b0479d39a20e077786c1a10b18dac 100644 (file)
@@ -264,7 +264,7 @@ def sync_timestamp(request):
 # List of all unapproved objects, for the special admin page
 @login_required
 @user_passes_test(lambda u: u.is_staff)
-@user_passes_test(lambda u: u.groups.filter(name='web slaves').exists())
+@user_passes_test(lambda u: u.groups.filter(name='pgweb moderators').exists())
 def admin_pending(request):
        return render(request, 'core/admin_pending.html', {
                        'app_list': get_all_pending_moderations(),