def notification_script_choices(): choices = [] for choice in user_script_choices("notifications") + [(None, _("ASCII Email (legacy)"))]: notificaton_plugin_name, _notification_plugin_title = choice if config.user.may("notification_plugin.%s" % notificaton_plugin_name): choices.append(choice) return choices
def notification_script_choices(): # Ensure the required dynamic permissions are registered declare_notification_plugin_permissions() choices = [] for choice in user_script_choices("notifications") + [ (None, _("ASCII Email (legacy)")) ]: notificaton_plugin_name, _notification_plugin_title = choice if user.may("notification_plugin.%s" % notificaton_plugin_name): choices.append(choice) return choices