use of org.apache.openmeetings.db.entity.room.Room.Right in project openmeetings by apache.
the class RoomPanel method denyRight.
public void denyRight(Client client, Right... rights) {
for (Right right : rights) {
client.deny(right);
}
if (client.hasActivity(Client.Activity.broadcastA) && !client.hasRight(Right.audio)) {
client.remove(Client.Activity.broadcastA);
}
if (client.hasActivity(Client.Activity.broadcastV) && !client.hasRight(Right.video)) {
client.remove(Client.Activity.broadcastV);
}
cm.update(client);
broadcast(client);
}
use of org.apache.openmeetings.db.entity.room.Room.Right in project openmeetings by apache.
the class RoomPanel method onBeforeRender.
@Override
protected void onBeforeRender() {
super.onBeforeRender();
if (room.isVisible()) {
// We are setting initial rights here
Client c = getClient();
final int count = cm.addToRoom(c.setRoom(getRoom()));
SOAPLogin soap = WebSession.get().getSoapLogin();
if (soap != null && soap.isModerator()) {
c.allow(Right.superModerator);
cm.update(c);
} else {
Set<Right> rr = AuthLevelUtil.getRoomRight(c.getUser(), r, r.isAppointment() ? apptDao.getByRoom(r.getId()) : null, count);
if (!rr.isEmpty()) {
c.allow(rr);
cm.update(c);
}
}
}
}