diff --git a/include/ajax.admin.php b/include/ajax.admin.php index e5139d8da599486a06c77e60bffc7c29961fa49e..ddeb7c5db090d30078925e202db7de47e36bd475 100644 --- a/include/ajax.admin.php +++ b/include/ajax.admin.php @@ -34,7 +34,7 @@ class AdminAjaxAPI extends AjaxController { $errors = array(); $vars = $form->getClean(); $vars += array( - 'group_membership' => Dept::ALERTS_DEPT_AND_GROUPS, + 'group_membership' => Dept::ALERTS_DEPT_AND_EXTENDED, ); if ($dept->update($vars, $errors)) { Http::response(201, $this->encode(array( diff --git a/include/class.dept.php b/include/class.dept.php index 9723c8925721c7e83b338271683c6dab10e49d91..a483eecc6e23b3d9f059c4e17307c9bf377ae1f1 100644 --- a/include/class.dept.php +++ b/include/class.dept.php @@ -58,7 +58,7 @@ implements TemplateVariable { var $autorespEmail; const ALERTS_DISABLED = 2; - const ALERTS_DEPT_AND_GROUPS = 1; + const ALERTS_DEPT_AND_EXTENDED = 1; const ALERTS_DEPT_ONLY = 0; const FLAG_ASSIGN_MEMBERS_ONLY = 0x0001; @@ -210,9 +210,14 @@ implements TemplateVariable { $rv = clone $this->getAvailableMembers(); $rv->filter(Q::any(array( // Ensure "Alerts" is enabled — must be a primary member or - // have alerts enabled on your membership. + // have alerts enabled on your membership and have alerts + // configured to extended to extended access members 'dept_id' => $this->getId(), - 'dept_access__flags__hasbit' => StaffDeptAccess::FLAG_ALERTS, + // NOTE: Manager is excluded here if not a member + Q::all(array( + 'group_membership' => self::ALERTS_DEPT_AND_EXTENDED, + 'dept_access__flags__hasbit' => StaffDeptAccess::FLAG_ALERTS, + )), ))); } return $rv; diff --git a/include/staff/department.inc.php b/include/staff/department.inc.php index 3a08962282b3d22df768c5aac3980de4b9aff122..62882a14ce1cdcdec9bdba876dd7605ead7657fa 100644 --- a/include/staff/department.inc.php +++ b/include/staff/department.inc.php @@ -268,7 +268,7 @@ $info = Format::htmlchars(($errors && $_POST) ? $_POST : $info); <?php foreach (array( Dept::ALERTS_DISABLED => __("No one (disable Alerts and Notices)"), Dept::ALERTS_DEPT_ONLY => __("Department members only"), - Dept::ALERTS_DEPT_AND_GROUPS => __("Department and Group members"), + Dept::ALERTS_DEPT_AND_EXTENDED => __("Department and extended access members"), ) as $mode=>$desc) { ?> <option value="<?php echo $mode; ?>" <?php if ($info['group_membership'] == $mode) echo 'selected="selected"';