diff --git a/tailbone/views/email.py b/tailbone/views/email.py index b3135d6a..3798639a 100644 --- a/tailbone/views/email.py +++ b/tailbone/views/email.py @@ -100,7 +100,7 @@ class EmailSettingView(MasterView): def get_data(self, session=None): data = [] - if self.has_perm('configure') and self.email_handler.use_entry_points(): + if self.has_perm('configure'): emails = self.email_handler.get_all_emails() else: emails = self.email_handler.get_available_emails() @@ -525,7 +525,18 @@ class EmailAttemptView(MasterView): f.set_enum('status_code', self.enum.EMAIL_ATTEMPT) -def includeme(config): +def defaults(config, **kwargs): + base = globals() + + EmailSettingView = kwargs.get('EmailSettingView', base['EmailSettingView']) EmailSettingView.defaults(config) + + EmailPreview = kwargs.get('EmailPreview', base['EmailPreview']) EmailPreview.defaults(config) + + EmailAttemptView = kwargs.get('EmailAttemptView', base['EmailAttemptView']) EmailAttemptView.defaults(config) + + +def includeme(config): + defaults(config)