Commit e81ad261 authored by Robert Lyon's avatar Robert Lyon

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

if a user sets their message preference to 'nobody' then we shouldn't
display the message icon

behatnotneeded

Change-Id: Ie60f964ffaa4359f58c69769a7814d058179533b
Signed-off-by: Robert Lyon's avatarRobert Lyon <robertl@catalyst.net.nz>
parent 61062b0d
......@@ -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