зеркало из https://github.com/mozilla/pjs.git
Bug #32008 --> add a requiresPassword method which we can use to
prevent us from always asking the user for a password whenever we need to logon to an external service. r=bienvenu
This commit is contained in:
Родитель
18119c7d6a
Коммит
7cd3da05a1
|
@ -1595,14 +1595,19 @@ nsresult nsImapIncomingServer::RequestOverrideInfo(nsIMsgWindow *aMsgWindow)
|
|||
{
|
||||
nsXPIDLCString password;
|
||||
nsXPIDLCString userName;
|
||||
PRBool requiresPassword = PR_TRUE;
|
||||
|
||||
GetUsername(getter_Copies(userName));
|
||||
GetPassword(getter_Copies(password));
|
||||
m_logonRedirector->RequiresPassword(userName, &requiresPassword);
|
||||
if (requiresPassword)
|
||||
{
|
||||
GetPassword(getter_Copies(password));
|
||||
|
||||
if (!((const char *) password) || nsCRT::strlen((const char *) password) == 0)
|
||||
PromptForPassword(getter_Copies(password), aMsgWindow);
|
||||
if (password)
|
||||
rv = m_logonRedirector->Logon(userName, password, logonRedirectorRequester, nsMsgLogonRedirectionServiceIDs::Imap);
|
||||
if (!((const char *) password) || nsCRT::strlen((const char *) password) == 0)
|
||||
PromptForPassword(getter_Copies(password), aMsgWindow);
|
||||
}
|
||||
|
||||
rv = m_logonRedirector->Logon(userName, password, logonRedirectorRequester, nsMsgLogonRedirectionServiceIDs::Imap);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче