示例#1
0
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
示例#2
0
文件: users.py 项目: m3rlinux/checkmk
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