Skip to content

Commit

Permalink
MBS-9808: Fix role filter in case of no users exist with filtered rol…
Browse files Browse the repository at this point in the history
…e(s)
  • Loading branch information
PhMemmel committed Jan 7, 2025
1 parent 629a1de commit eddacaf
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions classes/local/rights_config_table.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@ public function __construct(
if (!empty($roleuserids)) {
[$insql, $roleparams] = $DB->get_in_or_equal($roleuserids, SQL_PARAMS_NAMED);
$rolewhere = ' AND u.id ' . $insql;
} else {
// We could not find any user with the roles in the filter, so we need to return no entries.
$rolewhere = ' AND FALSE ';
}
}

Expand Down

0 comments on commit eddacaf

Please sign in to comment.