- do not ask moderator permissions if not guest or authenticated guest
This commit is contained in:
parent
48548a7adc
commit
07e9f78730
@ -306,35 +306,22 @@ public class Meeting {
|
||||
|
||||
|
||||
public String calcGuestStatus(String role, Boolean guest, Boolean authned) {
|
||||
if (GuestPolicy.ALWAYS_ACCEPT.equals(guestPolicy)) {
|
||||
return GuestPolicy.ALLOW;
|
||||
if (GuestPolicy.ALWAYS_ACCEPT.equals(guestPolicy)) {
|
||||
return GuestPolicy.ALLOW;
|
||||
} else if (GuestPolicy.ALWAYS_DENY.equals(guestPolicy)) {
|
||||
return GuestPolicy.DENY;
|
||||
}
|
||||
|
||||
if (ROLE_MODERATOR.equals(role.toUpperCase())) {
|
||||
return GuestPolicy.ALLOW;
|
||||
} else if (guest || ROLE_ATTENDEE.equals(role.toUpperCase())) {
|
||||
String policy = getGuestPolicy();
|
||||
switch (policy){
|
||||
case GuestPolicy.ASK_MODERATOR:
|
||||
return GuestPolicy.WAIT ;
|
||||
case GuestPolicy.ALWAYS_ACCEPT:
|
||||
return GuestPolicy.ALLOW ;
|
||||
//Do not ask to join
|
||||
case GuestPolicy.ALWAYS_ACCEPT_AUTH:
|
||||
if (authned){
|
||||
//If user is authenticated allow.
|
||||
return GuestPolicy.ALLOW ;
|
||||
}else{
|
||||
//Else ask for permission
|
||||
return GuestPolicy.WAIT ;
|
||||
}
|
||||
case GuestPolicy.ALWAYS_DENY:
|
||||
return GuestPolicy.DENY;
|
||||
return GuestPolicy.DENY;
|
||||
} else if (GuestPolicy.ASK_MODERATOR.equals(guestPolicy)) {
|
||||
if (guest || authned) {
|
||||
return GuestPolicy.WAIT ;
|
||||
}
|
||||
return GuestPolicy.ALLOW;
|
||||
} else if (GuestPolicy.ALWAYS_ACCEPT_AUTH.equals(guestPolicy)) {
|
||||
if (guest){
|
||||
// Only ask moderator for guests.
|
||||
return GuestPolicy.WAIT ;
|
||||
}
|
||||
return GuestPolicy.ALLOW;
|
||||
}
|
||||
|
||||
return GuestPolicy.DENY ;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user