"""
def wrapper(request, *args, **kwargs):
uploader = request.db.MediaEntry.find_one(
- {'_id': ObjectId(request.matchdict['media'])}).uploader()
+ {'slug': request.matchdict['media'] }).uploader()
if not (request.user['is_admin'] or
- request.user['_id'] == uploader['_id']):
+ request.user._id == uploader._id):
return exc.HTTPForbidden()
return controller(request, *args, **kwargs)