}
@Test
// Test for https://bugs.eclipse.org/bugs/show_bug.cgi?id=382760
public void testDisallowedSiteAccess() throws SAXException, IOException, JSONException, URISyntaxException, CoreException {
UserInfo userBObject = createUser("userB", "userB");
String userB = userBObject.getUniqueId();
// User "test": create file in test's workspace
final String filename = "foo.html";
final String fileContent = "<html><body>This is a test file</body></html>";
WebResponse createdFile = createFileOnServer("", filename, fileContent);
URL fileLocation = createdFile.getURL();
IPath filepath = new Path(fileLocation.getPath());
filepath = filepath.removeFirstSegments(new Path(FILE_SERVLET_LOCATION).segmentCount()); // chop off leading /file/
filepath = filepath.removeLastSegments(1); // chop off trailing /foo.html
filepath = filepath.makeAbsolute();
filepath = filepath.addTrailingSeparator();
String parentFolder = filepath.toString();
// User B: Give access to test's workspace
String bWorkspaceId = workspaceId;
AuthorizationService.addUserRight(userBObject.getUniqueId(), "/workspace/" + bWorkspaceId);
AuthorizationService.addUserRight(userBObject.getUniqueId(), "/workspace/" + bWorkspaceId + "/*");
// User B: create a site against B's workspace that exposes a file in test's workspace
final String siteName = "My hosted site";
final String filePath = parentFolder; //"/" + filename;
final String mountAt = "/"; //"/file.html";