Switch to unified view

a/Allura/allura/controllers/auth.py b/Allura/allura/controllers/auth.py
...
...
286
        c.form = F.subscription_form
286
        c.form = F.subscription_form
287
        c.revoke_access = F.oauth_revocation_form
287
        c.revoke_access = F.oauth_revocation_form
288
        subscriptions = []
288
        subscriptions = []
289
        mailboxes = M.Mailbox.query.find(dict(user_id=c.user._id, is_flash=False))
289
        mailboxes = M.Mailbox.query.find(dict(user_id=c.user._id, is_flash=False))
290
        mailboxes = list(mailboxes.ming_cursor)
290
        mailboxes = list(mailboxes.ming_cursor)
291
        project_collection = M.Project.query.mapper.collection
292
        app_collection = M.AppConfig.query.mapper.collection
291
        projects = dict(
293
        projects = dict(
292
            (p._id, p) for p in M.Project.query.find(dict(
294
            (p._id, p) for p in project_collection.m.find(dict(
293
                    _id={'$in': [mb.project_id for mb in mailboxes ]})).ming_cursor)
295
                    _id={'$in': [mb.project_id for mb in mailboxes ]})))
294
        app_index = dict(
296
        app_index = dict(
295
            (ac._id, ac) for ac in M.AppConfig.query.find(dict(
297
            (ac._id, ac) for ac in app_collection.m.find(dict(
296
                    _id={'$in': [ mb.app_config_id for mb in mailboxes ] })).ming_cursor)
298
                    _id={'$in': [mb.project_id for mb in mailboxes]})))
297
299
298
        for mb in mailboxes:
300
        for mb in mailboxes:
299
            project = projects.get(mb.project_id, None)
301
            project = projects.get(mb.project_id, None)
300
            app_config = app_index.get(mb.app_config_id, None)
302
            app_config = app_index.get(mb.app_config_id, None)
301
            if project is None:
303
            if project is None: