Skip to content

Commit

Permalink
Only show users notification options for projects they can access
Browse files Browse the repository at this point in the history
  • Loading branch information
Darren Worrall committed Nov 1, 2012
1 parent bc5a51f commit 33b13d6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/sentry/plugins/bases/notify.py
Expand Up @@ -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):
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 33b13d6

Please sign in to comment.