AuthenticatingUser authenticatingUser = new AuthenticatingUser(user.getName(), password);
bindAuthorization = userAdmin.getAuthorization(authenticatingUser);
// TODO check tokens as well
- if (bindAuthorization != null)
+ if (bindAuthorization != null) {
+ authenticatedUser = user;
return true;
+ }
} catch (Exception e) {
// silent
if(log.isTraceEnabled())
return uri;
}
- // protected List<String> getIndexedUserProperties() {
- // return indexedUserProperties;
- // }
- //
- // protected void setIndexedUserProperties(List<String>
- // indexedUserProperties) {
- // this.indexedUserProperties = indexedUserProperties;
- // }
-
private static boolean readOnlyDefault(URI uri) {
if (uri == null)
return true;
return !file.canWrite();
else
return !file.getParentFile().canWrite();
+ } else if (uri.getScheme().equals("ldap")) {
+ if (uri.getAuthority() != null)// assume writable if authenticated
+ return false;
}
- return true;
+ return true;// read only by default
}
public boolean isReadOnly() {