mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
make setting global
This commit is contained in:
parent
c7329da7e0
commit
6124b1207d
@ -21,7 +21,7 @@ class CoreNotificationsPlugin(SettingsMixin, IntegrationPluginBase):
|
|||||||
DESCRIPTION = _('Integrated outgoing notificaton methods')
|
DESCRIPTION = _('Integrated outgoing notificaton methods')
|
||||||
|
|
||||||
SETTINGS = {
|
SETTINGS = {
|
||||||
'NOTIFICATION_SEND_EMAILS': {
|
'ENABLE_NOTIFICATION_EMAILS': {
|
||||||
'name': _('Enable email notifications'),
|
'name': _('Enable email notifications'),
|
||||||
'description': _('Allow sending of emails for event notifications'),
|
'description': _('Allow sending of emails for event notifications'),
|
||||||
'default': True,
|
'default': True,
|
||||||
@ -43,6 +43,10 @@ class CoreNotificationsPlugin(SettingsMixin, IntegrationPluginBase):
|
|||||||
only for users which allow email notifications
|
only for users which allow email notifications
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
# Check if method globally enabled
|
||||||
|
if not self.get_setting('ENABLE_NOTIFICATION_EMAILS'):
|
||||||
|
return
|
||||||
|
|
||||||
allowed_users = []
|
allowed_users = []
|
||||||
|
|
||||||
for user in self.targets:
|
for user in self.targets:
|
||||||
|
Loading…
Reference in New Issue
Block a user