use of org.apache.wicket.core.request.ClientInfo in project openmeetings by apache.
the class WebSession method setUser.
private void setUser(User u, Set<Right> rights) {
Long _recordingId = recordingId;
Long _roomId = roomId;
Invitation _i = i;
SOAPLogin _soap = soap;
ClientInfo _info = clientInfo;
ExtendedClientProperties _extProps = extProps;
// required to prevent session fixation
replaceSession();
if (_recordingId != null) {
recordingId = _recordingId;
}
if (_roomId != null) {
roomId = _roomId;
}
if (_i != null) {
i = _i;
}
if (_soap != null) {
soap = _soap;
}
if (_info != null) {
clientInfo = _info;
}
if (_extProps != null) {
extProps = _extProps;
}
userId = u.getId();
if (rights == null || rights.isEmpty()) {
Set<Right> r = new HashSet<>(u.getRights());
if (u.getGroupUsers() != null && !AuthLevelUtil.hasAdminLevel(r)) {
for (GroupUser gu : u.getGroupUsers()) {
if (gu.isModerator()) {
r.add(Right.GroupAdmin);
break;
}
}
}
this.rights = Collections.unmodifiableSet(r);
} else {
this.rights = Collections.unmodifiableSet(rights);
}
languageId = u.getLanguageId();
externalType = u.getExternalType();
tz = getTimeZone(u);
ISO8601FORMAT = FastDateFormat.getInstance(ISO8601_FULL_FORMAT_STRING, tz);
setLocale(LocaleHelper.getLocale(u));
sdf = FormatHelper.getDateTimeFormat(u);
}
Aggregations