- JcrUtils.addPrivilege(currentSession, targetPath, chosenUser.getName(), jcrPrivilege);
+ String username = chosenUser.getName();
+ if (EclipseUiUtils.notEmpty(chosenDn) && chosenDn.equalsIgnoreCase(username))
+ // Enable forcing the username case. TODO clean once this issue
+ // has been generally addressed
+ username = chosenDn;
+ JcrUtils.addPrivilege(currentSession, targetPath, username, jcrPrivilege);