Always show "all" email settings if user has config perm
also tweak view config, per newer convention
This commit is contained in:
parent
d74025318e
commit
1152fba067
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue