diff --git a/bundles/org.eclipse.orion.server.servlets/src/org/eclipse/orion/internal/server/servlets/workspace/WorkspaceResourceHandler.java b/bundles/org.eclipse.orion.server.servlets/src/org/eclipse/orion/internal/server/servlets/workspace/WorkspaceResourceHandler.java index fa4bb2e..f8d1c3f 100644 --- a/bundles/org.eclipse.orion.server.servlets/src/org/eclipse/orion/internal/server/servlets/workspace/WorkspaceResourceHandler.java +++ b/bundles/org.eclipse.orion.server.servlets/src/org/eclipse/orion/internal/server/servlets/workspace/WorkspaceResourceHandler.java @@ -238,8 +238,15 @@ private boolean handleAddProject(HttpServletRequest request, HttpServletResponse // add user rights for the project try { - AuthorizationService.addUserRight(request.getRemoteUser(), URI.create(result.getString(ProtocolConstants.KEY_LOCATION)).getPath()); - AuthorizationService.addUserRight(request.getRemoteUser(), URI.create(result.getString(ProtocolConstants.KEY_LOCATION)).getPath() + "/*"); + String locationPath = URI.create(result.getString(ProtocolConstants.KEY_LOCATION)).getPath(); + //right to access the location + AuthorizationService.addUserRight(request.getRemoteUser(), locationPath); + //right to access all children of the location + if (locationPath.endsWith("/")) //$NON-NLS-1$ + locationPath += "*"; //$NON-NLS-1$ + else + locationPath += "/*"; //$NON-NLS-1$ + AuthorizationService.addUserRight(request.getRemoteUser(), locationPath); } catch (CoreException e) { statusHandler.handleRequest(request, response, e.getStatus()); }