mirror of
https://github.com/the-djmaze/snappymail.git
synced 2024-12-28 10:32:28 +08:00
domain short login configuration fix
This commit is contained in:
parent
6f258f2c60
commit
803217d5d5
7 changed files with 57 additions and 41 deletions
|
@ -567,7 +567,7 @@ RainLoopApp.prototype.bootstart = function ()
|
|||
bTwitter = this.settingsGet('AllowTwitterSocial')
|
||||
;
|
||||
|
||||
if (!this.settingsGet('RemoteChangePassword'))
|
||||
if (!this.settingsGet('AllowChangePassword'))
|
||||
{
|
||||
Utils.removeSettingsViewModel(SettingsChangePasswordScreen);
|
||||
}
|
||||
|
|
|
@ -34,14 +34,14 @@ function WebMailDataStorage()
|
|||
this.devPassword = '';
|
||||
|
||||
this.accountEmail = ko.observable('');
|
||||
this.accountLogin = ko.observable('');
|
||||
this.accountIncLogin = ko.observable('');
|
||||
this.accountOutLogin = ko.observable('');
|
||||
this.projectHash = ko.observable('');
|
||||
|
||||
this.threading = ko.observable(false);
|
||||
this.lastFoldersHash = '';
|
||||
|
||||
this.remoteSuggestions = false;
|
||||
this.remoteChangePassword = false;
|
||||
|
||||
// system folders
|
||||
this.sentFolder = ko.observable('');
|
||||
|
@ -389,7 +389,8 @@ WebMailDataStorage.prototype.populateDataOnStart = function()
|
|||
AbstractData.prototype.populateDataOnStart.call(this);
|
||||
|
||||
this.accountEmail(RL.settingsGet('Email'));
|
||||
this.accountLogin(RL.settingsGet('Login'));
|
||||
this.accountIncLogin(RL.settingsGet('IncLogin'));
|
||||
this.accountOutLogin(RL.settingsGet('OutLogin'));
|
||||
this.projectHash(RL.settingsGet('ProjectHash'));
|
||||
|
||||
this.displayName(RL.settingsGet('DisplayName'));
|
||||
|
@ -399,7 +400,6 @@ WebMailDataStorage.prototype.populateDataOnStart = function()
|
|||
this.lastFoldersHash = RL.local().get(Enums.ClientSideKeyName.FoldersLashHash) || '';
|
||||
|
||||
this.remoteSuggestions = !!RL.settingsGet('RemoteSuggestions');
|
||||
this.remoteChangePassword = !!RL.settingsGet('RemoteChangePassword');
|
||||
|
||||
this.devEmail = RL.settingsGet('DevEmail');
|
||||
this.devLogin = RL.settingsGet('DevLogin');
|
||||
|
|
|
@ -93,12 +93,40 @@ class Account
|
|||
return 0 < \strlen($this->sParentEmail) ? $this->sParentEmail : $this->sEmail;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function IncLogin()
|
||||
{
|
||||
$sLogin = $this->sLogin;
|
||||
if ($this->oDomain->IncShortLogin())
|
||||
{
|
||||
$sLogin = \MailSo\Base\Utils::GetAccountNameFromEmail($this->sLogin);
|
||||
}
|
||||
|
||||
return $sLogin;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function OutLogin()
|
||||
{
|
||||
$sLogin = $this->sLogin;
|
||||
if ($this->oDomain->OutShortLogin())
|
||||
{
|
||||
$sLogin = \MailSo\Base\Utils::GetAccountNameFromEmail($this->sLogin);
|
||||
}
|
||||
|
||||
return $sLogin;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function Login()
|
||||
{
|
||||
return $this->sLogin;
|
||||
return $this->IncLogin();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -291,7 +291,7 @@ class Actions
|
|||
if ($oAccount)
|
||||
{
|
||||
$sFileName = \str_replace('{user:email}', \strtolower($oAccount->Email()), $sFileName);
|
||||
$sFileName = \str_replace('{user:login}', $oAccount->Login(), $sFileName);
|
||||
$sFileName = \str_replace('{user:login}', $oAccount->IncLogin(), $sFileName);
|
||||
$sFileName = \str_replace('{user:domain}', \strtolower($oAccount->Domain()->Name()), $sFileName);
|
||||
}
|
||||
|
||||
|
@ -876,7 +876,7 @@ class Actions
|
|||
'AllowThemes' => (bool) $oConfig->Get('webmail', 'allow_themes', true),
|
||||
'AllowCustomTheme' => (bool) $oConfig->Get('webmail', 'allow_custom_theme', true),
|
||||
'SuggestionsLimit' => (int) $oConfig->Get('labs', 'suggestions_limit', 50),
|
||||
'RemoteChangePassword' => false,
|
||||
'AllowChangePassword' => false,
|
||||
'ContactsIsSupported' => (bool) $this->ContactsProvider()->IsSupported(),
|
||||
'ContactsIsAllowed' => (bool) $this->ContactsProvider()->IsActive(),
|
||||
'JsHash' => \md5(\RainLoop\Utils::GetConnectionToken()),
|
||||
|
@ -898,11 +898,12 @@ class Actions
|
|||
$oAccount = $this->getAccountFromToken(false);
|
||||
if ($oAccount instanceof \RainLoop\Account)
|
||||
{
|
||||
$aResult['Email'] = $oAccount->Email();
|
||||
$aResult['Login'] = $oAccount->Login();
|
||||
$aResult['Auth'] = true;
|
||||
$aResult['Email'] = $oAccount->Email();
|
||||
$aResult['IncLogin'] = $oAccount->IncLogin();
|
||||
$aResult['OutLogin'] = $oAccount->OutLogin();
|
||||
$aResult['AccountHash'] = $oAccount->Hash();
|
||||
$aResult['RemoteChangePassword'] = $this->ChangePasswordProvider()->PasswordChangePossibility($oAccount);
|
||||
$aResult['AllowChangePassword'] = $this->ChangePasswordProvider()->PasswordChangePossibility($oAccount);
|
||||
|
||||
$oSettings = $this->SettingsProvider()->Load($oAccount);
|
||||
}
|
||||
|
@ -1198,15 +1199,9 @@ class Actions
|
|||
|
||||
try
|
||||
{
|
||||
$sLogin = $oAccount->Login();
|
||||
if ($oAccount->Domain()->IncShortLogin())
|
||||
{
|
||||
$sLogin = \MailSo\Base\Utils::GetAccountNameFromEmail($sLogin);
|
||||
}
|
||||
|
||||
$this->MailClient()
|
||||
->Connect($oAccount->Domain()->IncHost(), $oAccount->Domain()->IncPort(), $oAccount->Domain()->IncSecure())
|
||||
->Login($sLogin, $oAccount->Password())
|
||||
->Login($oAccount->IncLogin(), $oAccount->Password())
|
||||
;
|
||||
}
|
||||
catch (\RainLoop\Exceptions\ClientException $oException)
|
||||
|
@ -3724,9 +3719,8 @@ class Actions
|
|||
'Secure' => $oAccount->Domain()->OutSecure(),
|
||||
'UseAuth' => $oAccount->Domain()->OutAuth(),
|
||||
'From' => empty($sFrom) ? $oAccount->Email() : $sFrom,
|
||||
'Login' => $oAccount->Login(),
|
||||
'Login' => $oAccount->OutLogin(),
|
||||
'Password' => $oAccount->Password(),
|
||||
'UseShortLogin' => $oAccount->Domain()->OutShortLogin(),
|
||||
'HiddenRcpt' => array()
|
||||
);
|
||||
|
||||
|
@ -3747,13 +3741,7 @@ class Actions
|
|||
{
|
||||
if ($aSmtpCredentials['UseAuth'])
|
||||
{
|
||||
$sLogin = $aSmtpCredentials['Login'];
|
||||
if ($aSmtpCredentials['UseShortLogin'])
|
||||
{
|
||||
$sLogin = \MailSo\Base\Utils::GetAccountNameFromEmail($sLogin);
|
||||
}
|
||||
|
||||
$oSmtpClient->Login($sLogin, $aSmtpCredentials['Password']);
|
||||
$oSmtpClient->Login($aSmtpCredentials['Login'], $aSmtpCredentials['Password']);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4973,7 +4961,7 @@ class Actions
|
|||
{
|
||||
$this->MailClient()
|
||||
->Connect($oAccount->Domain()->IncHost(), $oAccount->Domain()->IncPort(), $oAccount->Domain()->IncSecure())
|
||||
->Login($oAccount->Login(), $oAccount->Password(), !!$this->Config()->Get('labs', 'use_imap_auth_plain'))
|
||||
->Login($oAccount->IncLogin(), $oAccount->Password(), !!$this->Config()->Get('labs', 'use_imap_auth_plain'))
|
||||
;
|
||||
}
|
||||
catch (\MailSo\Net\Exceptions\ConnectionException $oException)
|
||||
|
|
|
@ -377,7 +377,7 @@ class Social
|
|||
{
|
||||
$aUserData = array(
|
||||
'Email' => $oAccount->Email(),
|
||||
'Login' => $oAccount->Login(),
|
||||
'Login' => $oAccount->IncLogin(),
|
||||
'Password' => $oAccount->Password()
|
||||
);
|
||||
|
||||
|
@ -489,7 +489,7 @@ class Social
|
|||
{
|
||||
$aUserData = array(
|
||||
'Email' => $oAccount->Email(),
|
||||
'Login' => $oAccount->Login(),
|
||||
'Login' => $oAccount->IncLogin(),
|
||||
'Password' => $oAccount->Password()
|
||||
);
|
||||
|
||||
|
@ -652,7 +652,7 @@ class Social
|
|||
|
||||
$aUserData = array(
|
||||
'Email' => $oAccount->Email(),
|
||||
'Login' => $oAccount->Login(),
|
||||
'Login' => $oAccount->IncLogin(),
|
||||
'Password' => $oAccount->Password()
|
||||
);
|
||||
|
||||
|
|
|
@ -12449,14 +12449,14 @@ function WebMailDataStorage()
|
|||
this.devPassword = '';
|
||||
|
||||
this.accountEmail = ko.observable('');
|
||||
this.accountLogin = ko.observable('');
|
||||
this.accountIncLogin = ko.observable('');
|
||||
this.accountOutLogin = ko.observable('');
|
||||
this.projectHash = ko.observable('');
|
||||
|
||||
this.threading = ko.observable(false);
|
||||
this.lastFoldersHash = '';
|
||||
|
||||
this.remoteSuggestions = false;
|
||||
this.remoteChangePassword = false;
|
||||
|
||||
// system folders
|
||||
this.sentFolder = ko.observable('');
|
||||
|
@ -12804,7 +12804,8 @@ WebMailDataStorage.prototype.populateDataOnStart = function()
|
|||
AbstractData.prototype.populateDataOnStart.call(this);
|
||||
|
||||
this.accountEmail(RL.settingsGet('Email'));
|
||||
this.accountLogin(RL.settingsGet('Login'));
|
||||
this.accountIncLogin(RL.settingsGet('IncLogin'));
|
||||
this.accountOutLogin(RL.settingsGet('OutLogin'));
|
||||
this.projectHash(RL.settingsGet('ProjectHash'));
|
||||
|
||||
this.displayName(RL.settingsGet('DisplayName'));
|
||||
|
@ -12814,7 +12815,6 @@ WebMailDataStorage.prototype.populateDataOnStart = function()
|
|||
this.lastFoldersHash = RL.local().get(Enums.ClientSideKeyName.FoldersLashHash) || '';
|
||||
|
||||
this.remoteSuggestions = !!RL.settingsGet('RemoteSuggestions');
|
||||
this.remoteChangePassword = !!RL.settingsGet('RemoteChangePassword');
|
||||
|
||||
this.devEmail = RL.settingsGet('DevEmail');
|
||||
this.devLogin = RL.settingsGet('DevLogin');
|
||||
|
@ -15792,7 +15792,7 @@ RainLoopApp.prototype.bootstart = function ()
|
|||
bTwitter = this.settingsGet('AllowTwitterSocial')
|
||||
;
|
||||
|
||||
if (!this.settingsGet('RemoteChangePassword'))
|
||||
if (!this.settingsGet('AllowChangePassword'))
|
||||
{
|
||||
Utils.removeSettingsViewModel(SettingsChangePasswordScreen);
|
||||
}
|
||||
|
|
10
rainloop/v/0.0.0/static/js/app.min.js
vendored
10
rainloop/v/0.0.0/static/js/app.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue