Skip to content

Commit

Permalink
SAK-26592 WebDAV dropbox access was very slow for schools that use an…
Browse files Browse the repository at this point in the history
… external user provider because the Sakai internal user id was being set to the provider for every user directory. This reverses the lookup order to first try the cheap and easy lookup and then to try the expensive getUserByEid lookup if that fails

git-svn-id: https://source.sakaiproject.org/svn/dav/trunk@310478 66ffb92e-73f9-0310-93c1-f5514f145a0a
  • Loading branch information
ottenhoff committed Jun 27, 2014
1 parent 7f8f50f commit ea20d1b
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions dav/dav/src/java/org/sakaiproject/dav/DavServlet.java
Original file line number Diff line number Diff line change
Expand Up @@ -1998,19 +1998,20 @@ else if (idx.startsWith("/") && !idx.endsWith("/") && idx.length() > 2)
if(parts.length == 4 && parts[1].equals("group-user")){
try
{
// if successful, the context is already a valid user EID
UserDirectoryService.getUserByEid(parts[3]);
// try using it as an ID
resourceName = UserDirectoryService.getUserEid(parts[3]);
}
catch (UserNotDefinedException tryId)
{
try
{
// try using it as an ID
resourceName = UserDirectoryService.getUserEid(parts[3]);
// if successful, the context is already a valid user EID
UserDirectoryService.getUserByEid(parts[3]);
}
catch (UserNotDefinedException notId)
{
// if context was not a valid ID, leave it alone
M_log.warn("getResourceNameSAKAI could not find either id or eid: " + parts[3]);
}
}
}
Expand Down

0 comments on commit ea20d1b

Please sign in to comment.