Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Only show users notification options for projects they can access #641

Merged
merged 1 commit into from

2 participants

@DazWorrall

We had some confusion internally where registered users, when browsing /account/settings/notifications/, thought they were opting in for email notifications for a project when in fact they weren't a member of that project's team, so the notifications never came through. This changes the form to show only projects you're a member of.

@dcramer dcramer merged commit 3d94495 into getsentry:master
@dcramer
Owner

Good catch, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 1 deletion.
  1. +2 −1  src/sentry/plugins/bases/notify.py
View
3  src/sentry/plugins/bases/notify.py
@@ -13,6 +13,7 @@
from sentry.models import UserOption
from sentry.utils.cache import cache
from sentry.web.helpers import get_project_list
+from sentry.constants import MEMBER_USER
class NotificationConfigurationForm(forms.Form):
@@ -44,7 +45,7 @@ class NotificationUserOptionsForm(BaseNotificationUserOptionsForm):
def __init__(self, *args, **kwargs):
super(NotificationUserOptionsForm, self).__init__(*args, **kwargs)
user = self.user
- self.project_list = get_project_list(user, key='slug')
+ self.project_list = get_project_list(user, access=MEMBER_USER, key='slug')
project_list = sorted(self.project_list.items())
self.fields['projects'].choices = project_list
self.fields['projects'].widget.choices = self.fields['projects'].choices
Something went wrong with that request. Please try again.