<configuration>
<configtab name="user" desc="User Capabilities and Constraints">
<configsection name="user">
+ <configboolean name="allow_accounts" desc="Should we allow users to add
+ remote accounts?">false</configboolean>
<configswitch name="allow_folders" desc="Should we allow users to use
folders at all? NOTE: setting this to false will mean there is no place to
save sent-mail or postponed messages, along with the obvious effects of
'purge_spam_keep'));
}
-$prefGroups['accounts'] = array(
- 'column' => _("General Options"),
- 'label' => _("Additional Accounts"),
- 'desc' => _("Configure additional mail accounts to display."),
- 'members' => array('accountsmanagement')
-);
+if (!empty($GLOBALS['conf']['user']['allow_accounts'])) {
+ $prefGroups['accounts'] = array(
+ 'column' => _("General Options"),
+ 'label' => _("Additional Accounts"),
+ 'desc' => _("Configure additional mail accounts to display."),
+ 'members' => array('accountsmanagement')
+ );
+}
$prefGroups['compose'] = array(
'column' => _("Message Options"),
'display' => array('g' => _("Apply filter rules whenever Inbox is displayed?"), 'p' => 'filter_on_display', 'h' => 'filter-on-display', 'l' => $display_locked),
'sidebar' => array('g' => _("Apply filter rules whenever sidebar is refreshed?"), 'p' => 'filter_on_sidebar', 'h' => 'filter-on-sidebar', 'l' => $sidebar_locked),
'any_mailbox' => array('g' => _("Allow filter rules to be applied in any mailbox?"), 'p' => 'filter_any_mailbox', 'h' => 'filter-any-mailbox', 'l' => $anymailbox_locked),
- 'menuitem' => array('g' => _("Show the filter icon on the menubar?"), 'p' => 'filter_menuitem', 'l' => $menuitem_locked));
+ 'menuitem' => array('g' => _("Show the filter icon on the menubar?"), 'p' => 'filter_menuitem', 'l' => $menuitem_locked)
+ );
+
if ($_SESSION['imp']['protocol'] == 'pop') {
unset($options_array['any_mailbox']);
}
+
$opts = array();
foreach ($options_array as $key => $val) {
if (!$val['l']) {
case 'accountsmanagement':
$GLOBALS['prefsui_no_save'] = true;
- return true;
+ return !empty($GLOBALS['conf']['user']['allow_accounts']);
default:
return true;