use of org.apache.openmeetings.web.util.ExtendedClientProperties in project openmeetings by apache.
the class WebSession method invalidate.
@Override
public void invalidate() {
cm.invalidate(userId, getId());
super.invalidate();
userId = null;
rights = Collections.unmodifiableSet(Collections.<Right>emptySet());
ISO8601FORMAT = null;
sdf = null;
languageId = -1;
i = null;
soap = null;
roomId = null;
recordingId = null;
externalType = null;
tz = null;
browserTz = null;
extProps = new ExtendedClientProperties();
}
use of org.apache.openmeetings.web.util.ExtendedClientProperties 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