Browse files

Only show users notification options for projects they can access

  • Loading branch information...
1 parent bc5a51f commit 33b13d6017766e0cda2586aa87dda273caf51e86 @DazWorrall DazWorrall committed Nov 1, 2012
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

0 comments on commit 33b13d6

Please sign in to comment.