【问题标题】:How to change notifications settings for new Sentry On-Premise users?如何更改新 Sentry On-Premise 用户的通知设置?
【发布时间】:2018-12-05 11:55:57
【问题描述】:

我正在使用 LDAP 身份验证配置 Sentry 本地安装(使用默认 Docker 映像),因此每当用户首次登录时,都会在后台创建 Sentry 用户。

这些新用户的默认通知设置非常烦人,因为 Workflow Notifications 标志设置为 Always,理想情况下我们希望它是 Only On Issues I Subscribe To

我知道每个新用户都可以手动更新他们的设置,但这是一家大型公司,我不想指导每个人在他们厌倦了收到太多通知并来到这里时进行更改问我。

简而言之:有没有办法为新 Sentry 用户更新默认通知设置?

【问题讨论】:

    标签: docker ldap sentry


    【解决方案1】:

    作为一种快速而肮脏的方式来实现这一点,我在构建我们的自定义 Sentry on Premise Docker 映像时应用了这个补丁,以及我们复制配置文件的步骤。

    diff --git a/src/sentry/api/endpoints/user_notification_details.py b/src/sentry/api/endpoints/user_notification_details.py
    index a382b6b7e3..2edd21efc7 100644
    --- a/src/sentry/api/endpoints/user_notification_details.py
    +++ b/src/sentry/api/endpoints/user_notification_details.py
    @@ -36,7 +36,7 @@ USER_OPTION_SETTINGS = {
         },
         'workflowNotifications': {
             'key': 'workflow:notifications',
    -        'default': UserOptionValue.all_conversations,  # '0'
    +        'default': UserOptionValue.participating_only,  # '0'
             'type': int,
         }
     }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-07-26
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-04-28
      相关资源
      最近更新 更多