Skip to content
Snippets Groups Projects

Make Jitsi links not appear for unassigned requests

Files

@@ -237,6 +237,18 @@ public class Request implements RecordsEvents<Request>, Serializable, Comparable
this.jitsiRoom = jitsiRoom;
}
/**
* Determines whether the Jitsi Room should be displayed for a user.
*
* @param user the user
* @return true if the Jitsi room should be displayed
*/
public boolean shouldDisplayJitsiRoom(User user) {
return lab.isOnline() && ((assistant != null && assistant.equals(user))
|| user.isAdmin()
|| (user.isTeacher() && !user.teaches(getLab().getCourse())));
}
public Lab getLab() {
return lab;
}
Loading