"""
from authkit.authenticate import AddDictToEnviron
-from authkit.authorize import NotAuthorizedError
+from authkit.authorize import NotAuthenticatedError, NotAuthorizedError
from authkit.permissions import RequestPermission
from sqlalchemy.exceptions import InvalidRequestError
raise NotAuthenticatedError('Not Authenticated')
try:
environ['user'] = meta.Session.query(model.User).\
- filter_by(username=environ['REMOTE_USER']).\
+ filter_by(username=unicode(environ['REMOTE_USER'])).\
one()
except InvalidRequestError:
raise NotAuthorizedError('You are not allowed access.')