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

« back to all changes in this revision

Viewing changes to lib/common/studpath.py

  • Committer: stevenbird
  • Date: 2008-02-18 21:21:59 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:496
larger image for exercises

Show diffs side-by-side

added added

removed removed

Lines of Context:
114
114
    return len(props) > 0
115
115
 
116
116
def authorize(req):
117
 
    """Given a request, checks whether req.user is allowed to
 
117
    """Given a request, checks whether req.username is allowed to
118
118
    access req.path. Returns None on authorization success. Raises
119
119
    HTTP_FORBIDDEN on failure.
120
120
 
129
129
        req.throw_error(req.HTTP_FORBIDDEN)
130
130
 
131
131
    (owner, _) = util.split_path(urlpath)
132
 
    if req.user.login != owner:
 
132
    if req.username != owner:
133
133
        req.throw_error(req.HTTP_FORBIDDEN)
134
134
 
135
135
def authorize_public(req):