diff options
author | Zygmunt Krynicki <zygmunt.krynicki@linaro.org> | 2010-09-10 11:46:49 +0200 |
---|---|---|
committer | Zygmunt Krynicki <zygmunt.krynicki@linaro.org> | 2010-09-10 11:46:49 +0200 |
commit | f08239dda463005b38455eec701da22dd26e9d27 (patch) | |
tree | aa8fc3b0039815fef4cf272ae8de717f0a8a0df4 /dashboard_app/xmlrpc.py | |
parent | 409bc5321c9e9fe9f7ea97447bcdcd97c6075e43 (diff) |
Make DashboardAPI().streams() use new model manager methods
Diffstat (limited to 'dashboard_app/xmlrpc.py')
-rw-r--r-- | dashboard_app/xmlrpc.py | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/dashboard_app/xmlrpc.py b/dashboard_app/xmlrpc.py index 02b81e075..46b73876f 100644 --- a/dashboard_app/xmlrpc.py +++ b/dashboard_app/xmlrpc.py @@ -240,14 +240,7 @@ class DashboardAPI(object): - team streams are accessible by team members """ user = None - if user is not None: - bundle_streams = BundleStream.objects.filter( - Q(user__isnull = True, group__isnull = True) | - Q(user = user) | - Q(group__in = request.user.groups.all())) - else: - bundle_streams = BundleStream.objects.filter( - user__isnull = True, group__isnull = True) + bundle_streams = BundleStream.objects.allowed_for_user(user) return [{ 'pathname': bundle_stream.pathname, 'name': bundle_stream.name, |