~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to ivle/dispatch/__init__.py

  • Committer: William Grant
  • Date: 2010-02-11 12:17:37 UTC
  • Revision ID: grantw@unimelb.edu.au-20100211121737-1zsmpp8i8rbyliku
Add a subject listing with new/edit icons.

Show diffs side-by-side

added added

removed removed

Lines of Context:
65
65
    def traversed_to_object(self, obj):
66
66
        """Check that the user has any permission at all over the object."""
67
67
        if (hasattr(obj, 'get_permissions') and
68
 
            len(obj.get_permissions(self.root.user, config)) == 0):
 
68
            len(obj.get_permissions(self.root.user)) == 0):
69
69
            # Indicate the forbidden object if this is an admin.
70
70
            if self.root.user and self.root.user.admin:
71
71
                raise Unauthorized('Unauthorized: %s' % obj)
205
205
            XHTMLErrorView(req, NotFound(), e[0]).render(req)
206
206
 
207
207
        return req.OK
208
 
    finally:
209
 
        req.store.close()
210
208
 
211
209
def handle_unknown_exception(req, exc_type, exc_value, exc_traceback):
212
210
    """