capability to remove mailboxes when user looses right on them,

some documentation and setting mailbox name by ldap query
This commit is contained in:
cm-schl 2022-11-29 16:28:59 +01:00
parent 3aa063d475
commit 79191cf7a3
2 changed files with 69 additions and 45 deletions

View file

@ -31,11 +31,17 @@ class LdapMailAccountsPlugin extends AbstractPlugin
public function Init(): void
{
$this->addHook("login.success", 'AddLdapMailAccounts');
$this->addHook("login.success", 'AddAdditionalLdapMailAccounts');
}
// Function gets called by RainLoop/Actions/User.php
public function AddLdapMailAccounts(Account $oAccount)
/**
* Add additional mail accounts to the webinterface of the user by looking up the ldap directory
*
* @param Account $oAccount
*/
public function AddAdditionalLdapMailAccounts(Account $oAccount)
{
// Set up config
$config = LdapConfig::MakeConfig($this->Config());
@ -45,6 +51,9 @@ class LdapMailAccountsPlugin extends AbstractPlugin
$oldapMailAccounts->AddLdapMailAccounts($oAccount);
}
/**
* Defines the content of the plugin configuration page inside the Admin Panel of SnappyMail
*/
protected function configMapping(): array
{
return [