Commit 48652001 authored by Cecilia Vela Gurovic's avatar Cecilia Vela Gurovic Committed by Gerrit Code Review

Merge "Bug 1836977: Isolated institutions to respect 'nobody' message setting"

parents 8af3a599 e81ad261
......@@ -1864,7 +1864,7 @@ function can_send_message($from, $to) {
$cansend = true;
}
// Can send message if the 'isolatedinstitutions' is set and both users are from the same institution
if (is_isolated()) {
if ($messagepref != 'nobody' && is_isolated()) {
try {
isolatedinstitution_access($to, $from->id);
$cansend = true;
......
......@@ -70,6 +70,7 @@ class BehatAdmin extends BehatBase {
'institutionexpirynotification',
'institutionautosuspend',
'requireregistrationconfirm',
'isolatedinstitutions',
// Account settings
// Security settings
// Proxy settings
......@@ -102,6 +103,11 @@ class BehatAdmin extends BehatBase {
// Ensure allowpublicprofiles is set as well
$settings['allowpublicprofiles'] = 1;
}
foreach ($settings as $key => $setting) {
if (!array_search($key, $allowsettings)) {
throw new SystemException("The option \"$key\" is not a valid setting");
}
}
// Update site settings
$oldsearchplugin = get_config('searchplugin');
......
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