 			})
 			callback()
 
-try_read_access = (requester, project_id, test, callback) ->
+try_read_access = (user, project_id, test, callback) ->
 	async.parallel [
 		(cb) ->
-			requester.get "/project/#{project_id}", (error, response, body) ->
+			user.request.get "/project/#{project_id}", (error, response, body) ->
 				return cb(error) if error?
 				test(response, body)
 				cb()
 		(cb) ->
-			requester.get "/project/#{project_id}/download/zip", (error, response, body) ->
+			user.request.get "/project/#{project_id}/download/zip", (error, response, body) ->
 				return cb(error) if error?
 				test(response, body)
 				cb()
 	], callback
 
-try_settings_write_access = (requester, project_id, test, callback) ->
+try_settings_write_access = (user, project_id, test, callback) ->
 	async.parallel [
 		(cb) ->
-			requester.post {
+			user.request.post {
 				uri: "/project/#{project_id}/settings"
 				json:
 					compiler: "latex"

				cb()
	], callback

try_admin_access = (requester, project_id, test, callback) ->
	async.parallel [
		(cb) ->
			requester.post {
				uri: "/project/#{project_id}/rename"
				json:
					newProjectName: "new-name"

						done()

		it "should allow the read-only user read access to it", (done) ->
			expect_read_access @ro_user, @project_id, done
		
		it "should not allow the read-only user write access to its content", (done) ->
			expect_no_content_write_access @ro_user, @project_id, done
			
		it "should not allow the read-only user write access to its settings", (done) ->
			expect_no_settings_write_access @ro_user, @project_id, redirect_to: "/restricted", done
		
		it "should not allow the read-only user admin access to it", (done) ->
			expect_no_admin_access @ro_user, @project_id, redirect_to: "/restricted", done

		it "should allow the read-write user read access to it", (done) ->
			expect_read_access @rw_user, @project_id, done
		
		it "should allow the read-write user write access to its content", (done) ->
			expect_content_write_access @rw_user, @project_id, done

		it "should allow the read-write user write access to its settings", (done) ->
			expect_settings_write_access @rw_user, @project_id, done

		it "should not allow the read-write user admin access to it", (done) ->
			expect_no_admin_access @rw_user, @project_id, redirect_to: "/restricted", done

	describe "public read-write project", ->
		before (done) ->
