mirror of
https://github.com/bitwarden/browser.git
synced 2025-02-03 23:21:29 +01:00
check for features being disabled
This commit is contained in:
parent
0a825899db
commit
4ac447b2d2
@ -280,6 +280,11 @@ export default class RuntimeBackground {
|
|||||||
const ciphers = await this.cipherService.getAllDecryptedForUrl(loginInfo.url);
|
const ciphers = await this.cipherService.getAllDecryptedForUrl(loginInfo.url);
|
||||||
const usernameMatches = ciphers.filter((c) => c.login.username === loginInfo.username);
|
const usernameMatches = ciphers.filter((c) => c.login.username === loginInfo.username);
|
||||||
if (usernameMatches.length === 0) {
|
if (usernameMatches.length === 0) {
|
||||||
|
const disabledAddLogin = await this.storageService.get<boolean>(
|
||||||
|
ConstantsService.disableAddLoginNotificationKey);
|
||||||
|
if (disabledAddLogin) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
// remove any old messages for this tab
|
// remove any old messages for this tab
|
||||||
this.removeTabFromNotificationQueue(tab);
|
this.removeTabFromNotificationQueue(tab);
|
||||||
this.main.notificationQueue.push({
|
this.main.notificationQueue.push({
|
||||||
@ -293,6 +298,11 @@ export default class RuntimeBackground {
|
|||||||
});
|
});
|
||||||
await this.main.checkNotificationQueue(tab);
|
await this.main.checkNotificationQueue(tab);
|
||||||
} else if (usernameMatches.length === 1 && usernameMatches[0].login.password !== loginInfo.password) {
|
} else if (usernameMatches.length === 1 && usernameMatches[0].login.password !== loginInfo.password) {
|
||||||
|
const disabledChangePassword = await this.storageService.get<boolean>(
|
||||||
|
ConstantsService.disableChangedPasswordNotificationKey);
|
||||||
|
if (disabledChangePassword) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.addChangedPasswordToQueue(usernameMatches[0].id, loginDomain, loginInfo.password, tab);
|
this.addChangedPasswordToQueue(usernameMatches[0].id, loginDomain, loginInfo.password, tab);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -326,7 +326,8 @@ document.addEventListener('DOMContentLoaded', (event) => {
|
|||||||
if (formData[i].formEl !== form) {
|
if (formData[i].formEl !== form) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (!disabledAddLoginNotification && formData[i].usernameEl != null && formData[i].passwordEl != null) {
|
const disabledBoth = disabledChangedPasswordNotification && disabledAddLoginNotification;
|
||||||
|
if (!disabledBoth && formData[i].usernameEl != null && formData[i].passwordEl != null) {
|
||||||
const login = {
|
const login = {
|
||||||
username: formData[i].usernameEl.value,
|
username: formData[i].usernameEl.value,
|
||||||
password: formData[i].passwordEl.value,
|
password: formData[i].passwordEl.value,
|
||||||
|
Loading…
Reference in New Issue
Block a user