Commit e7773346 authored by Robert Lyon's avatar Robert Lyon Committed by Gerrit Code Review

Merge "Bug 1830302: Check if site is set for isolated institutions"

parents 6e5fb781 28fc80f6
......@@ -1835,12 +1835,14 @@ function can_send_message($from, $to) {
$cansend = true;
}
// Can send message if the 'isolatedinstitutions' is set and both users are from the same institution
try {
isolatedinstitution_access($to, $from->id);
$cansend = true;
}
catch (AccessDeniedException $e) {
$cansend = false;
if (is_isolated()) {
try {
isolatedinstitution_access($to, $from->id);
$cansend = true;
}
catch (AccessDeniedException $e) {
$cansend = false;
}
}
return $cansend;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment