pass user, project to middleware