Skip to content

Commit

Permalink
CONTRIB-7627: Fix for participation rules for users applied as rules …
Browse files Browse the repository at this point in the history
…for roles (#116)
  • Loading branch information
jfederico authored Feb 21, 2019
1 parent a5da037 commit 4ee33d2
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions locallib.php
Original file line number Diff line number Diff line change
Expand Up @@ -865,15 +865,18 @@ function bigbluebuttonbn_is_moderator_validate_rule($participant, $userid, $user
if ($participant['role'] == BIGBLUEBUTTONBN_ROLE_VIEWER) {
return false;
}
// Looks for all configuration.
// Validation for the 'all' rule.
if ($participant['selectiontype'] == 'all') {
return true;
}
// Looks for users.
if ($participant['selectiontype'] == 'user' && $participant['selectionid'] == $userid) {
return true;
// Validation for a 'user' rule.
if ($participant['selectiontype'] == 'user') {
if ($participant['selectionid'] == $userid) {
return true;
}
return false;
}
// Looks for roles.
// Validation for a 'role' rule.
$role = bigbluebuttonbn_get_role($participant['selectionid']);
if ($role != null && array_key_exists($role->id, $userroles)) {
return true;
Expand Down

0 comments on commit 4ee33d2

Please sign in to comment.