+ // Required: modules/xnetlists.php uses it too.
+ Platal::load('lists', 'lists.inc.php');
+
+ return new MailingList($mbox, $this->get_lists_domain());
+ }
+
+ /** Ensure the current user is an administrator of the group.
+ */
+ protected function is_group_admin($page)
+ {
+ $force_rights = false;
+ if ($GLOBALS['IS_XNET_SITE']) {
+ $perms = S::v('perms');
+ if (is_object($perms) && $perms->hasFlag('groupadmin')) {
+ $force_rights = true;
+ }
+ }
+ $page->assign('group_admin', $force_rights);
+
+ return $force_rights;
+ }
+
+ /** Ensure the current user owns the given MailingList.
+ */
+ protected function verify_list_owner($page, $mlist)
+ {
+ if (list(, , $owners) = $mlist->getMembers()) {