mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-06 16:07:03 +03:00
renaming of files and classes resolve conflict with plugin ldap-identities
This commit is contained in:
parent
79191cf7a3
commit
71069a8cc9
5 changed files with 35 additions and 36 deletions
|
|
@ -23,8 +23,8 @@ class LdapMailAccountsPlugin extends AbstractPlugin
|
|||
public function __construct()
|
||||
{
|
||||
include_once __DIR__ . '/LdapMailAccounts.php';
|
||||
include_once __DIR__ . '/LdapConfig.php';
|
||||
include_once __DIR__ . '/LdapException.php';
|
||||
include_once __DIR__ . '/LdapMailAccountsConfig.php';
|
||||
include_once __DIR__ . '/LdapMailAccountsException.php';
|
||||
|
||||
parent::__construct();
|
||||
}
|
||||
|
|
@ -40,11 +40,10 @@ class LdapMailAccountsPlugin extends AbstractPlugin
|
|||
*
|
||||
* @param Account $oAccount
|
||||
*/
|
||||
|
||||
public function AddAdditionalLdapMailAccounts(Account $oAccount)
|
||||
{
|
||||
// Set up config
|
||||
$config = LdapConfig::MakeConfig($this->Config());
|
||||
$config = LdapMailAccountsConfig::MakeConfig($this->Config());
|
||||
|
||||
$oldapMailAccounts = new LdapMailAccounts($config, $this->Manager()->Actions()->Logger());
|
||||
|
||||
|
|
@ -57,44 +56,44 @@ class LdapMailAccountsPlugin extends AbstractPlugin
|
|||
protected function configMapping(): array
|
||||
{
|
||||
return [
|
||||
Property::NewInstance(LdapConfig::CONFIG_SERVER)
|
||||
Property::NewInstance(LdapMailAccountsConfig::CONFIG_SERVER)
|
||||
->SetLabel("LDAP Server URL")
|
||||
->SetPlaceholder("ldap://server:port")
|
||||
->SetType(PluginPropertyType::STRING),
|
||||
|
||||
Property::NewInstance(LdapConfig::CONFIG_PROTOCOL_VERSION)
|
||||
Property::NewInstance(LdapMailAccountsConfig::CONFIG_PROTOCOL_VERSION)
|
||||
->SetLabel("LDAP Protocol Version")
|
||||
->SetType(PluginPropertyType::SELECTION)
|
||||
->SetDefaultValue([2, 3]),
|
||||
|
||||
Property::NewInstance(LdapConfig::CONFIG_BIND_USER)
|
||||
Property::NewInstance(LdapMailAccountsConfig::CONFIG_BIND_USER)
|
||||
->SetLabel("LDAP Username")
|
||||
->SetDescription("The user to use for binding to the LDAP server. Should be a DN or RDN. Leave empty for anonymous bind.")
|
||||
->SetType(PluginPropertyType::STRING),
|
||||
|
||||
Property::NewInstance(LdapConfig::CONFIG_BIND_PASSWORD)
|
||||
Property::NewInstance(LdapMailAccountsConfig::CONFIG_BIND_PASSWORD)
|
||||
->SetLabel("LDAP Password")
|
||||
->SetDescription("Leave empty for anonymous bind.")
|
||||
->SetType(PluginPropertyType::PASSWORD),
|
||||
|
||||
Property::NewInstance(LdapConfig::CONFIG_OBJECTCLASS)
|
||||
Property::NewInstance(LdapMailAccountsConfig::CONFIG_OBJECTCLASS)
|
||||
->SetLabel("Object class")
|
||||
->SetType(PluginPropertyType::STRING)
|
||||
->SetDescription("The object class to use when searching for additional mail accounts of the logged in SnappyMail user")
|
||||
->SetDefaultValue("user"),
|
||||
|
||||
Property::NewInstance(LdapConfig::CONFIG_BASE)
|
||||
Property::NewInstance(LdapMailAccountsConfig::CONFIG_BASE)
|
||||
->SetLabel("Base DN")
|
||||
->SetType(PluginPropertyType::STRING)
|
||||
->SetDescription("The base DN to search in for additional mail accounts of the logged in SnappyMail user"),
|
||||
|
||||
Property::NewInstance(LdapConfig::CONFIG_FIELD_SEARCH)
|
||||
Property::NewInstance(LdapMailAccountsConfig::CONFIG_FIELD_SEARCH)
|
||||
->SetLabel("Search field")
|
||||
->SetType(PluginPropertyType::STRING)
|
||||
->SetDescription("The name of the ldap attribute that has to contain the here defined 'LDAP search string'.")
|
||||
->SetDefaultValue("member"),
|
||||
|
||||
Property::NewInstance(LdapConfig::CONFIG_SEARCH_STRING)
|
||||
Property::NewInstance(LdapMailAccountsConfig::CONFIG_SEARCH_STRING)
|
||||
->SetLabel("LDAP search string")
|
||||
->SetType(PluginPropertyType::STRING)
|
||||
->SetDescription("The search string used to find ldap objects of mail accounts the user has access to.
|
||||
|
|
@ -102,7 +101,7 @@ class LdapMailAccountsPlugin extends AbstractPlugin
|
|||
\n#BASE_DN# - replaced with the value inside the field 'User base DN'.")
|
||||
->SetDefaultValue("uid=#USERNAME#"),
|
||||
|
||||
Property::NewInstance(LdapConfig::CONFIG_FIELD_USERNAME)
|
||||
Property::NewInstance(LdapMailAccountsConfig::CONFIG_FIELD_USERNAME)
|
||||
->SetLabel("Username field of additional account")
|
||||
->SetType(PluginPropertyType::STRING)
|
||||
->SetDescription("The field containing the username of the found additional mail account.
|
||||
|
|
@ -110,7 +109,7 @@ class LdapMailAccountsPlugin extends AbstractPlugin
|
|||
\nIf this field contains an email address, only the local-part before the @ is used.")
|
||||
->SetDefaultValue("uid"),
|
||||
|
||||
Property::NewInstance(LdapConfig::CONFIG_FIELD_MAIL_DOMAIN)
|
||||
Property::NewInstance(LdapMailAccountsConfig::CONFIG_FIELD_MAIL_DOMAIN)
|
||||
->SetLabel("Domain name field of additional account")
|
||||
->SetType(PluginPropertyType::STRING)
|
||||
->SetDescription("The field containing the domain name of the found additional mail account.
|
||||
|
|
@ -118,7 +117,7 @@ class LdapMailAccountsPlugin extends AbstractPlugin
|
|||
\nIf this field contains an email address, only the domain-part after the @ is used.")
|
||||
->SetDefaultValue("mail"),
|
||||
|
||||
Property::NewInstance(LdapConfig::CONFIG_FIELD_NAME)
|
||||
Property::NewInstance(LdapMailAccountsConfig::CONFIG_FIELD_NAME)
|
||||
->SetLabel("Additional account name field")
|
||||
->SetType(PluginPropertyType::STRING)
|
||||
->SetDescription("The field containing the default sender name of the found additional mail account.")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue