"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "openmeetings-web/src/main/java/org/apache/openmeetings/web/room/RoomPanel.java" between
apache-openmeetings-6.1.0-src.tar.gz and apache-openmeetings-6.2.0-src.tar.gz

About: OpenMeetings is a browser-based software that allows you to set up instantly a conference in the Web. You can use your microphone or webcam, share documents on a white board, share your screen or record meetings. Source code.

RoomPanel.java  (apache-openmeetings-6.1.0-src):RoomPanel.java  (apache-openmeetings-6.2.0-src)
skipping to change at line 49 skipping to change at line 49
import org.apache.commons.text.StringEscapeUtils; import org.apache.commons.text.StringEscapeUtils;
import org.apache.openmeetings.core.remote.KurentoHandler; import org.apache.openmeetings.core.remote.KurentoHandler;
import org.apache.openmeetings.core.remote.StreamProcessor; import org.apache.openmeetings.core.remote.StreamProcessor;
import org.apache.openmeetings.core.util.WebSocketHelper; import org.apache.openmeetings.core.util.WebSocketHelper;
import org.apache.openmeetings.db.dao.calendar.AppointmentDao; import org.apache.openmeetings.db.dao.calendar.AppointmentDao;
import org.apache.openmeetings.db.dao.file.FileItemDao; import org.apache.openmeetings.db.dao.file.FileItemDao;
import org.apache.openmeetings.db.dao.user.UserDao; import org.apache.openmeetings.db.dao.user.UserDao;
import org.apache.openmeetings.db.entity.basic.Client; import org.apache.openmeetings.db.entity.basic.Client;
import org.apache.openmeetings.db.entity.calendar.Appointment; import org.apache.openmeetings.db.entity.calendar.Appointment;
import org.apache.openmeetings.db.entity.calendar.MeetingMember;
import org.apache.openmeetings.db.entity.file.BaseFileItem; import org.apache.openmeetings.db.entity.file.BaseFileItem;
import org.apache.openmeetings.db.entity.room.Room; import org.apache.openmeetings.db.entity.room.Room;
import org.apache.openmeetings.db.entity.room.Room.Right; import org.apache.openmeetings.db.entity.room.Room.Right;
import org.apache.openmeetings.db.entity.room.Room.RoomElement; import org.apache.openmeetings.db.entity.room.Room.RoomElement;
import org.apache.openmeetings.db.entity.room.RoomGroup; import org.apache.openmeetings.db.entity.room.RoomGroup;
import org.apache.openmeetings.db.entity.server.SOAPLogin; import org.apache.openmeetings.db.entity.server.SOAPLogin;
import org.apache.openmeetings.db.entity.user.GroupUser;
import org.apache.openmeetings.db.entity.user.User;
import org.apache.openmeetings.db.util.AuthLevelUtil; import org.apache.openmeetings.db.util.AuthLevelUtil;
import org.apache.openmeetings.db.util.ws.RoomMessage; import org.apache.openmeetings.db.util.ws.RoomMessage;
import org.apache.openmeetings.db.util.ws.RoomMessage.Type; import org.apache.openmeetings.db.util.ws.RoomMessage.Type;
import org.apache.openmeetings.db.util.ws.TextRoomMessage; import org.apache.openmeetings.db.util.ws.TextRoomMessage;
import org.apache.openmeetings.util.NullStringer; import org.apache.openmeetings.util.NullStringer;
import org.apache.openmeetings.web.app.Application;
import org.apache.openmeetings.web.app.ClientManager; import org.apache.openmeetings.web.app.ClientManager;
import org.apache.openmeetings.web.app.QuickPollManager; import org.apache.openmeetings.web.app.QuickPollManager;
import org.apache.openmeetings.web.app.TimerService; import org.apache.openmeetings.web.app.TimerService;
import org.apache.openmeetings.web.app.WebSession; import org.apache.openmeetings.web.app.WebSession;
import org.apache.openmeetings.web.common.BasePanel; import org.apache.openmeetings.web.common.BasePanel;
import org.apache.openmeetings.web.room.activities.Activity; import org.apache.openmeetings.web.room.activities.Activity;
import org.apache.openmeetings.web.room.menu.RoomMenuPanel; import org.apache.openmeetings.web.room.menu.RoomMenuPanel;
import org.apache.openmeetings.web.room.sidebar.RoomSidebar; import org.apache.openmeetings.web.room.sidebar.RoomSidebar;
import org.apache.openmeetings.web.room.wb.AbstractWbPanel; import org.apache.openmeetings.web.room.wb.AbstractWbPanel;
import org.apache.openmeetings.web.room.wb.InterviewWbPanel; import org.apache.openmeetings.web.room.wb.InterviewWbPanel;
skipping to change at line 335 skipping to change at line 333
room.add(sidebar = new RoomSidebar("sidebar", this)); room.add(sidebar = new RoomSidebar("sidebar", this));
add(roomClosed = new RedirectMessageDialog("room-closed", "1098", r.isClosed(), r.getRedirectURL())); add(roomClosed = new RedirectMessageDialog("room-closed", "1098", r.isClosed(), r.getRedirectURL()));
if (r.isClosed()) { if (r.isClosed()) {
room.setVisible(false); room.setVisible(false);
} else if (cm.streamByRoom(r.getId()).count() >= r.getCapacity()) { } else if (cm.streamByRoom(r.getId()).count() >= r.getCapacity()) {
accessDenied = new ExpiredMessageDialog(ACCESS_DENIED_ID, getString("99"), menu); accessDenied = new ExpiredMessageDialog(ACCESS_DENIED_ID, getString("99"), menu);
room.setVisible(false); room.setVisible(false);
} else if (r.getId().equals(WebSession.get().getRoomId())) { } else if (r.getId().equals(WebSession.get().getRoomId())) {
// secureHash/invitationHash, already checked // secureHash/invitationHash, already checked
} else { } else {
boolean allowed = false; boolean allowed = Application.get().isRoomAllowedToUser(r , c.getUser());
String deniedMessage = null; String deniedMessage = null;
if (r.isAppointment()) { if (r.isAppointment()) {
Appointment a = apptDao.getByRoom(r.getId()); Appointment a = apptDao.getByRoom(r.getId());
if (a != null && !a.isDeleted()) { if (allowed) {
boolean isOwner = a.getOwner().getId().eq Calendar cal = WebSession.getCalendar();
uals(getUserId()); if (a.isOwner(getUserId()) || cal.getTime
allowed = isOwner; ().after(allowedStart(a.getStart())) && cal.getTime().before(a.getEnd())) {
log.debug("appointed room, isOwner ? {}", eventDetail = new EventDetailDial
isOwner); og(EVENT_DETAILS_ID, a);
if (!allowed) { } else {
for (MeetingMember mm : a.getMeet allowed = false;
ingMembers()) { deniedMessage = String.format("%s
if (getUserId().equals(mm %s - %s", getString("error.hash.period"), getDateFormat().format(a.getStart()),
.getUser().getId())) { getDateFormat().format(a.getEnd()));
allowed = true;
break;
}
}
}
if (allowed) {
Calendar cal = WebSession.getCale
ndar();
if (isOwner || cal.getTime().afte
r(allowedStart(a.getStart())) && cal.getTime().before(a.getEnd())) {
eventDetail = new EventDe
tailDialog(EVENT_DETAILS_ID, a);
} else {
allowed = false;
deniedMessage = String.fo
rmat("%s %s - %s", getString("error.hash.period"), getDateFormat().format(a.getS
tart()), getDateFormat().format(a.getEnd()));
}
}
}
} else {
allowed = r.getIspublic() || (r.getOwnerId() != n
ull && r.getOwnerId().equals(getUserId()));
log.debug("public ? {}, ownedId ? {} {}", r.getIs
public(), r.getOwnerId(), allowed);
if (!allowed) {
User u = c.getUser();
for (RoomGroup ro : r.getGroups()) {
for (GroupUser ou : u.getGroupUse
rs()) {
if (ro.getGroup().getId()
.equals(ou.getGroup().getId())) {
allowed = true;
break;
}
}
if (allowed) {
break;
}
} }
} }
} }
if (!allowed) { if (!allowed) {
if (deniedMessage == null) { if (deniedMessage == null) {
deniedMessage = getString("1599"); deniedMessage = getString("1599");
} }
accessDenied = new ExpiredMessageDialog(ACCESS_DE NIED_ID, deniedMessage, menu); accessDenied = new ExpiredMessageDialog(ACCESS_DE NIED_ID, deniedMessage, menu);
room.setVisible(false); room.setVisible(false);
} }
 End of changes. 5 change blocks. 
54 lines changed or deleted 13 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)