forked from extern/egroupware
* Admin/Mail: allow to limit users to only create identities for aliases
This commit is contained in:
parent
c6c0cd90d1
commit
74e2c62b48
@ -130,6 +130,17 @@ class admin_mail
|
||||
'email' => 'EMail-address from account',
|
||||
);
|
||||
|
||||
/**
|
||||
* Options for further identities
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public static $further_identities = array(
|
||||
0 => 'Forbid users to create identities',
|
||||
1 => 'Allow users to create further identities',
|
||||
2 => 'Allow users to create identities for aliases',
|
||||
);
|
||||
|
||||
/**
|
||||
* List of domains know to not support Sieve
|
||||
*
|
||||
@ -929,6 +940,11 @@ class admin_mail
|
||||
unset($content['acc_smtp_auth_session']);
|
||||
unset($content['notify_use_default']);
|
||||
}
|
||||
// copy ident_email_alias selectbox back to regular name
|
||||
elseif (isset($content['ident_email_alias']))
|
||||
{
|
||||
$content['ident_email'] = $content['ident_email_alias'];
|
||||
}
|
||||
$edit_access = Mail\Account::check_access(Acl::EDIT, $content);
|
||||
|
||||
// disable notification save-default and use-default, if only one account or no edit-rights
|
||||
@ -1179,6 +1195,17 @@ class admin_mail
|
||||
$sel_options['acc_imap_logintype'] = self::$login_types;
|
||||
$sel_options['ident_id'] = $content['identities'];
|
||||
$sel_options['acc_id'] = $content['accounts'];
|
||||
$sel_options['acc_further_identities'] = self::$further_identities;
|
||||
|
||||
// if only aliases are allowed for futher identities, add them as options
|
||||
if ($content['acc_further_identities'] == 2)
|
||||
{
|
||||
$sel_options['ident_email_alias'] = array_merge(
|
||||
array('' => $content['mailLocalAddress'].' ('.lang('Default').')'),
|
||||
array_combine($content['mailAlternateAddress'], $content['mailAlternateAddress']));
|
||||
// copy ident_email to select-box ident_email_alias, as et2 requires unique ids
|
||||
$content['ident_email_alias'] = $content['ident_email'];
|
||||
}
|
||||
|
||||
// user is allowed to create or edit further identities
|
||||
if ($edit_access || $content['acc_further_identities'])
|
||||
@ -1227,6 +1254,10 @@ class admin_mail
|
||||
// disable aliases tab for default smtp class EGroupware\Api\Mail\Smtp
|
||||
$readonlys['tabs']['admin.mailaccount.aliases'] = !$content['acc_smtp_type'] ||
|
||||
$content['acc_smtp_type'] == 'EGroupware\\Api\\Mail\\Smtp';
|
||||
if ($readonlys['tabs']['admin.mailaccount.aliases'])
|
||||
{
|
||||
unset($sel_options['acc_further_identities'][2]); // can limit identities to aliases without aliases ;-)
|
||||
}
|
||||
|
||||
// allow smtp class to disable certain features in alias tab
|
||||
if ($content['acc_smtp_type'] && class_exists($content['acc_smtp_type']) &&
|
||||
|
@ -100,6 +100,7 @@ all users admin de Alle Benutzer
|
||||
allow anonymous access to this app admin de Anonymen Zugriff auf diese Anwendung zulassen
|
||||
allow remote administration from following install id's (comma separated) admin de Erlaube die Remote-Verwaltung durch folgende (Komma separierte) Install IDs
|
||||
allow users to change forwards admin de Anwender dürfen Weiterleitung bearbeiten
|
||||
allow users to create identities for aliases admin de Anwender dürfen Identitäten für Aliase anlegen
|
||||
alternate email address admin de zusätzliche E-Mail-Adressen
|
||||
and logged in admin de und eingeloggt
|
||||
anonymous user admin de Anonymer Benutzer
|
||||
@ -394,6 +395,7 @@ filtered by group admin de Suche nach Gruppenprofilen
|
||||
folder acl admin de Zugriffsrechte
|
||||
for the times above admin de für die oben angegebenen Zeiten
|
||||
for the times below (empty values count as '*', all empty = every minute) admin de für die darunter angegebenen Zeiten (leere Felder zählen als "*", alles leer = jede Minute)
|
||||
forbid users to create identities admin de Anwender dürfen keine Identitäten anlegen
|
||||
force selectbox admin de Auswahl erzwingen
|
||||
force users to change their password regularily?(empty for no,number for after that number of days admin de Erzwinge das ändern von Passwörtern durch den Benutzer nach X Tagen. (leer für nein, eine positive Zahl für alle X Tage)
|
||||
forward also to admin de zusätzlich weiterleiten
|
||||
|
@ -100,6 +100,7 @@ all users admin en All users
|
||||
allow anonymous access to this app admin en Allow anonymous access to this app
|
||||
allow remote administration from following install id's (comma separated) admin en Allow remote administration from following install ID's, comma separated.
|
||||
allow users to change forwards admin en Allow users to change forwards
|
||||
allow users to create identities for aliases admin en Allow users to create identities for aliases
|
||||
alternate email address admin en Alternate email address
|
||||
and logged in admin en and logged in
|
||||
anonymous user admin en Anonymous user
|
||||
@ -394,6 +395,7 @@ filtered by group admin en Filtered by group
|
||||
folder acl admin en Folder ACL
|
||||
for the times above admin en For the times above
|
||||
for the times below (empty values count as '*', all empty = every minute) admin en For the times below: empty values count as '*', all empty = every minute.
|
||||
forbid users to create identities admin en Forbid users to create identities
|
||||
force selectbox admin en Force select box
|
||||
force users to change their password regularily?(empty for no,number for after that number of days admin en Set recurrent forced password change. Set a number of days. Empty = No
|
||||
forward also to admin en Forward also to
|
||||
|
@ -12,29 +12,31 @@
|
||||
<rows>
|
||||
<row>
|
||||
<description for="ident_id" value="Identity"/>
|
||||
<menulist>
|
||||
<menupopup id="ident_id" no_lang="1" onchange="1"/>
|
||||
</menulist>
|
||||
<checkbox label="allow users to create further identities" id="acc_further_identities" class="emailadmin_no_user"/>
|
||||
<select id="ident_id" no_lang="1" onchange="1"/>
|
||||
<select id="acc_further_identities" class="emailadmin_no_user" onchange="1"/>
|
||||
</row>
|
||||
<row>
|
||||
<description for="ident_name" value="Name"/>
|
||||
<textbox id="ident_name" size="80" maxlength="128" span="all" blur="default your name and email"/>
|
||||
<textbox id="ident_name" size="90" maxlength="128" span="all" blur="default your name and email"/>
|
||||
</row>
|
||||
<row>
|
||||
<description for="ident_realname" value="Your name"/>
|
||||
<hbox span="all">
|
||||
<textbox id="ident_realname" size="80" maxlength="128"/>
|
||||
<textbox id="ident_realname" size="90" maxlength="128"/>
|
||||
<buttononly label="Placeholders" id="button[placeholders]" onclick="window.open(egw::link('/index.php','menuaction=addressbook.addressbook_merge.show_replacements&nonavbar=1'),'_blank','dependent=yes,width=860,height=620,scrollbars=yes,status=yes'); return false;" options="dialog_help"/>
|
||||
</hbox>
|
||||
</row>
|
||||
<row>
|
||||
<description for="ident_org" value="Organisation"/>
|
||||
<textbox id="ident_org" size="80" maxlength="128" span="all"/>
|
||||
<textbox id="ident_org" size="90" maxlength="128" span="all"/>
|
||||
</row>
|
||||
<row>
|
||||
<row disabled="@acc_further_identities=2">
|
||||
<description for="ident_email" value="EMail address"/>
|
||||
<url-email id="ident_email" options="80,128" span="all"/>
|
||||
<url-email id="ident_email" size="90" maxlength="128" span="all"/>
|
||||
</row>
|
||||
<row disabled="!@acc_further_identities=2">
|
||||
<description for="ident_email_alias" value="EMail address"/>
|
||||
<select id="ident_email_alias" span="all" class="et2_fullWidth"/>
|
||||
</row>
|
||||
<row>
|
||||
<htmlarea expand_toolbar="false" height="125px" id="ident_signature" span="all" width="100%"/>
|
||||
|
3
api/setup/setup.inc.php
Executable file → Normal file
3
api/setup/setup.inc.php
Executable file → Normal file
@ -12,7 +12,7 @@
|
||||
/* Basic information about this app */
|
||||
$setup_info['api']['name'] = 'api';
|
||||
$setup_info['api']['title'] = 'EGroupware API';
|
||||
$setup_info['api']['version'] = '16.1.003';
|
||||
$setup_info['api']['version'] = '16.1.004';
|
||||
$setup_info['api']['versions']['current_header'] = '1.29';
|
||||
$setup_info['api']['enable'] = 3;
|
||||
$setup_info['api']['app_order'] = 1;
|
||||
@ -128,3 +128,4 @@ $setup_info['groupdav']['author'] = $setup_info['groupdav']['maintainer'] = arra
|
||||
$setup_info['groupdav']['license'] = 'GPL';
|
||||
$setup_info['groupdav']['hooks']['preferences'] = 'EGroupware\\Api\\CalDAV\\Hooks::menus';
|
||||
$setup_info['groupdav']['hooks']['settings'] = 'EGroupware\\Api\\CalDAV\\Hooks::settings';
|
||||
|
||||
|
@ -440,7 +440,6 @@ $phpgw_baseline = array(
|
||||
'acc_imap_type' => array('type' => 'ascii','precision' => '32','default' => 'emailadmin_imap','comment' => 'imap class to use'),
|
||||
'acc_imap_logintype' => array('type' => 'ascii','precision' => '20','comment' => 'standard, vmailmgr, admin, uidNumber'),
|
||||
'acc_domain' => array('type' => 'varchar','precision' => '100','comment' => 'domain name'),
|
||||
'acc_further_identities' => array('type' => 'bool','nullable' => False,'default' => '1','comment' => '0=no, 1=yes'),
|
||||
'acc_user_editable' => array('type' => 'bool','nullable' => False,'default' => '1','comment' => '0=no, 1=yes'),
|
||||
'acc_sieve_ssl' => array('type' => 'int','precision' => '1','default' => '1','comment' => '0=none, 1=starttls, 2=tls, 3=ssl, &8=validate certificate'),
|
||||
'acc_modified' => array('type' => 'timestamp','nullable' => False,'default' => 'current_timestamp'),
|
||||
@ -449,7 +448,8 @@ $phpgw_baseline = array(
|
||||
'acc_folder_junk' => array('type' => 'varchar','precision' => '128','comment' => 'junk folder'),
|
||||
'acc_imap_default_quota' => array('type' => 'int','precision' => '4','comment' => 'default quota, if no user specific one set'),
|
||||
'acc_imap_timeout' => array('type' => 'int','precision' => '2','comment' => 'timeout for imap connection'),
|
||||
'acc_user_forward' => array('type' => 'bool','default' => '0','comment' => 'allow user to define forwards')
|
||||
'acc_user_forward' => array('type' => 'bool','default' => '0','comment' => 'allow user to define forwards'),
|
||||
'acc_further_identities' => array('type' => 'int','precision' => '1','nullable' => False,'default' => '1','comment' => '0=no, 1=yes, 2=only matching aliases')
|
||||
),
|
||||
'pk' => array('acc_id'),
|
||||
'fk' => array(),
|
||||
@ -508,5 +508,5 @@ $phpgw_baseline = array(
|
||||
'fk' => array(),
|
||||
'ix' => array(array('account_id','acc_id')),
|
||||
'uc' => array()
|
||||
),
|
||||
)
|
||||
);
|
||||
|
@ -117,3 +117,25 @@ function api_upgrade16_1_002()
|
||||
|
||||
return $GLOBALS['setup_info']['api']['currentver'] = '16.1.003';
|
||||
}
|
||||
|
||||
/**
|
||||
* Change egw_ea_accounts.acc_further_identities from boolean to int(1)
|
||||
*
|
||||
* @return type
|
||||
*/
|
||||
function api_upgrade16_1_003()
|
||||
{
|
||||
$GLOBALS['egw_setup']->oProc->RenameColumn('egw_ea_accounts', 'acc_further_identities', 'further_bool');
|
||||
$GLOBALS['egw_setup']->oProc->AddColumn('egw_ea_accounts','acc_further_identities',array(
|
||||
'type' => 'int',
|
||||
'precision' => '1',
|
||||
'nullable' => False,
|
||||
'default' => '1',
|
||||
'comment' => '0=no, 1=yes, 2=only matching aliases'
|
||||
));
|
||||
$GLOBALS['egw_setup']->oProc->query('UPDATE egw_ea_accounts SET acc_further_identities=0 WHERE NOT further_bool', __LINE__, __FILE__);
|
||||
$GLOBALS['egw_setup']->oProc->DropColumn('egw_ea_accounts',
|
||||
$GLOBALS['egw_setup']->db->get_table_definitions('api', 'egw_ea_accounts'), 'further_bool');
|
||||
|
||||
return $GLOBALS['setup_info']['api']['currentver'] = '16.1.004';
|
||||
}
|
||||
|
@ -1045,7 +1045,7 @@ class Account implements \ArrayAccess
|
||||
*/
|
||||
protected static function db2data(array $data)
|
||||
{
|
||||
foreach(array('acc_sieve_enabled','acc_further_identities','acc_user_editable','acc_smtp_auth_session','acc_user_forward') as $name)
|
||||
foreach(array('acc_sieve_enabled','acc_user_editable','acc_smtp_auth_session','acc_user_forward') as $name)
|
||||
{
|
||||
if (isset($data[$name]))
|
||||
{
|
||||
|
@ -32,7 +32,7 @@ all of mail de alle
|
||||
all subfolders will be deleted too, and all messages in all affected folders will be lost mail de Alle Unterordner und Nachrichten in den betroffenen Ordnern werden unwiederruflich gelöscht.
|
||||
allow external images mail de Erlaube Bilder von externen Bildquellen
|
||||
allow images from external sources in html emails mail de Erlaube Bilder von externen Bildquellen in HTML-E-Mails
|
||||
allow users to create further identities mail de Anwender dürfen weitere Identitäten hinzufügen
|
||||
allow users to create further identities mail de Anwender dürfen weitere Identitäten anlegen
|
||||
allways a new window mail de immer in einem neuen Fenster
|
||||
always show html emails mail de HTML-E-Mails immer anzeigen
|
||||
an error happend while trying to remove acl rights from the account %1! mail de Ein Fehler trat auf beim Versuch die Zugriffskontrollrechte vom Konto %1 zu entfernen!
|
||||
@ -102,14 +102,9 @@ deleted! mail de gelöscht!
|
||||
deleting %1 folders in progress ... mail de %1 Ordner in Bearbeitung zum Löschen
|
||||
deleting folders mail de Ordner werden gelöscht
|
||||
deny certain groups access to following features mail de Den Zugriff auf bestimmte Funktionen im E-Mail Modul einschränken.
|
||||
<<<<<<< Updated upstream
|
||||
directories have to be shared. mail de Verzeichnisse müssen freigegeben werden.
|
||||
disable mail de Deaktivieren
|
||||
=======
|
||||
details mail de Mit Kurzvorschau
|
||||
directories have to be shared. mail de Verzeichnisse müssen freigegeben werden
|
||||
disable mail de deaktivieren
|
||||
>>>>>>> Stashed changes
|
||||
disable ruler for separation of mailbody and signature mail de Signatur-Trennzeichen ausblenden
|
||||
disable use of flowed lines in plain text mails (rfc3676) mail de Variablen Zeilenumbruch in text Mails (RFC3676) abschalten
|
||||
disabled! mail de deaktiviert
|
||||
|
@ -173,6 +173,7 @@ error:could not save the acl! because some names are empty! mail en Error:Could
|
||||
esync will fail without a working email configuration! mail en eSync will FAIL without a working eMail configuration!
|
||||
event details follow mail en Event Details follow
|
||||
everyone mail en Everyone
|
||||
examine namespace to retrieve folders in others and shared mail en Examine Namespace to retrieve Folders in OTHERS and SHARED
|
||||
extended mail en Extended
|
||||
extra sent folders mail en Extra sent folders
|
||||
failed to delete %1 mail en Failed to delete %1
|
||||
@ -259,7 +260,7 @@ importance mail en importance
|
||||
important mail en important
|
||||
in mailbox: %1, with id: %2, and partid: %3 mail en In Mailbox: %1, with ID: %2, and PartID: %3
|
||||
inbox mail en INBOX
|
||||
initialization of mail failed. Please use the Wizard to cope with the problem. mail en Initialization of mail failed. Please use the Wizard to cope with the problem.
|
||||
initialization of mail failed. please use the wizard to cope with the problem. mail en Initialization of mail failed. Please use the Wizard to cope with the problem.
|
||||
inline mail en Inline
|
||||
insert the signature at top of the new (or reply) message when opening compose dialog (you may not be able to switch signatures) mail en insert the signature at top of the new (or reply) message when opening compose dialog (you may not be able to switch signatures)
|
||||
job mail en job
|
||||
@ -296,8 +297,8 @@ move mail en Move
|
||||
move folder mail en Move Folder
|
||||
move selected mails to archive mail en Move selected mails to archive
|
||||
move selected to mail en Move selected to
|
||||
move to archive mail en Move to archive folder
|
||||
move to mail en Move to
|
||||
move to archive mail en Move to archive folder
|
||||
move to trash mail en move to trash
|
||||
moved %1 message(s) from %2 to %3 mail en moved %1 message(s) from %2 to %3
|
||||
moving folders from one mailaccount to another is not supported mail en Moving Folders from one Mailaccount to another is not supported
|
||||
@ -565,4 +566,3 @@ you need to install mailvelope plugin available for chrome and firefox from %1.
|
||||
you need to save the message as draft first before to be able to save it into vfs mail en You need to save the message as draft first before to be able to save it into VFS
|
||||
you will loose current message body, unless you save it to your clipboard! mail en You will loose current message body, unless you save it to your clipboard!
|
||||
you've got new mail mail en You've got new mail
|
||||
examine namespace to retrieve folders in others and shared mail en Examine Namespace to retrieve Folders in OTHERS and SHARED
|
||||
|
Loading…
Reference in New Issue
Block a user