Search in sources :

Example 1 with Right

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);
}
Also used : Right(org.apache.openmeetings.db.entity.room.Room.Right)

Example 2 with Right

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);
            }
        }
    }
}
Also used : SOAPLogin(org.apache.openmeetings.db.entity.server.SOAPLogin) Right(org.apache.openmeetings.db.entity.room.Room.Right) Client(org.apache.openmeetings.db.entity.basic.Client)

Aggregations

Right (org.apache.openmeetings.db.entity.room.Room.Right)2 Client (org.apache.openmeetings.db.entity.basic.Client)1 SOAPLogin (org.apache.openmeetings.db.entity.server.SOAPLogin)1