in extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/user/ModeledUser.java [425:475]
private void setRestrictedAttributes(Map<String, String> attributes) {
// Translate disabled attribute
if (attributes.containsKey(DISABLED_ATTRIBUTE_NAME))
getModel().setDisabled("true".equals(attributes.get(DISABLED_ATTRIBUTE_NAME)));
// Translate password expired attribute
if (attributes.containsKey(EXPIRED_ATTRIBUTE_NAME))
getModel().setExpired("true".equals(attributes.get(EXPIRED_ATTRIBUTE_NAME)));
// Translate access window start time
if (attributes.containsKey(ACCESS_WINDOW_START_ATTRIBUTE_NAME)) {
try { getModel().setAccessWindowStart(parseTime(attributes.get(ACCESS_WINDOW_START_ATTRIBUTE_NAME))); }
catch (ParseException e) {
logger.warn("Not setting start time of user access window: {}", e.getMessage());
logger.debug("Unable to parse time attribute.", e);
}
}
// Translate access window end time
if (attributes.containsKey(ACCESS_WINDOW_END_ATTRIBUTE_NAME)) {
try { getModel().setAccessWindowEnd(parseTime(attributes.get(ACCESS_WINDOW_END_ATTRIBUTE_NAME))); }
catch (ParseException e) {
logger.warn("Not setting end time of user access window: {}", e.getMessage());
logger.debug("Unable to parse time attribute.", e);
}
}
// Translate account validity start date
if (attributes.containsKey(VALID_FROM_ATTRIBUTE_NAME)) {
try { getModel().setValidFrom(parseDate(attributes.get(VALID_FROM_ATTRIBUTE_NAME))); }
catch (ParseException e) {
logger.warn("Not setting user validity start date: {}", e.getMessage());
logger.debug("Unable to parse date attribute.", e);
}
}
// Translate account validity end date
if (attributes.containsKey(VALID_UNTIL_ATTRIBUTE_NAME)) {
try { getModel().setValidUntil(parseDate(attributes.get(VALID_UNTIL_ATTRIBUTE_NAME))); }
catch (ParseException e) {
logger.warn("Not setting user validity end date: {}", e.getMessage());
logger.debug("Unable to parse date attribute.", e);
}
}
// Translate timezone attribute
if (attributes.containsKey(TIMEZONE_ATTRIBUTE_NAME))
getModel().setTimeZone(TimeZoneField.parse(attributes.get(TIMEZONE_ATTRIBUTE_NAME)));
}