mirror of
https://github.com/wekan/wekan.git
synced 2025-12-16 23:40:13 +01:00
Includes possibility to block username change
This commit is contained in:
parent
c48c18c4e9
commit
2fa1b3122d
47 changed files with 139 additions and 71 deletions
|
|
@ -115,8 +115,12 @@ BlazeComponent.extendComponent({
|
|||
const password = $('#mail-server-password').val().trim();
|
||||
const from = this.checkField('#mail-server-from');
|
||||
const tls = $('#mail-server-tls.is-checked').length > 0;
|
||||
Settings.update(Settings.findOne()._id, {$set:{'mailServer.host':host, 'mailServer.port': port, 'mailServer.username': username,
|
||||
'mailServer.password': password, 'mailServer.enableTLS': tls, 'mailServer.from': from}});
|
||||
Settings.update(Settings.findOne()._id, {
|
||||
$set: {
|
||||
'mailServer.host': host, 'mailServer.port': port, 'mailServer.username': username,
|
||||
'mailServer.password': password, 'mailServer.enableTLS': tls, 'mailServer.from': from,
|
||||
},
|
||||
});
|
||||
} catch (e) {
|
||||
return;
|
||||
} finally {
|
||||
|
|
@ -136,7 +140,8 @@ BlazeComponent.extendComponent({
|
|||
const message = `${TAPi18n.__(err.error)}\n${reason}`;
|
||||
console.log(message, err);
|
||||
alert(message);
|
||||
} /* eslint-enable no-console */
|
||||
}
|
||||
/* eslint-enable no-console */
|
||||
});
|
||||
},
|
||||
|
||||
|
|
@ -154,20 +159,28 @@ BlazeComponent.extendComponent({
|
|||
}).register('setting');
|
||||
|
||||
BlazeComponent.extendComponent({
|
||||
saveAllowEmailChange() {
|
||||
|
||||
saveAccountsChange() {
|
||||
const allowEmailChange = ($('input[name=allowEmailChange]:checked').val() === 'true');
|
||||
const allowUserNameChange = ($('input[name=allowUserNameChange]:checked').val() === 'true');
|
||||
AccountSettings.update('accounts-allowEmailChange', {
|
||||
$set: {'booleanValue': allowEmailChange},
|
||||
});
|
||||
AccountSettings.update('accounts-allowUserNameChange', {
|
||||
$set: {'booleanValue': allowUserNameChange},
|
||||
});
|
||||
},
|
||||
|
||||
allowEmailChange() {
|
||||
return AccountSettings.findOne('accounts-allowEmailChange').booleanValue;
|
||||
},
|
||||
allowUserNameChange() {
|
||||
return AccountSettings.findOne('accounts-allowUserNameChange').booleanValue;
|
||||
},
|
||||
|
||||
events() {
|
||||
return [{
|
||||
'click button.js-accounts-save': this.saveAllowEmailChange,
|
||||
'click button.js-accounts-save': this.saveAccountsChange,
|
||||
}];
|
||||
},
|
||||
}).register('accountSettings');
|
||||
|
|
|
|||
|
|
@ -33,7 +33,10 @@ template(name="editProfilePopup")
|
|||
| {{_ 'username'}}
|
||||
span.error.hide.username-taken
|
||||
| {{_ 'error-username-taken'}}
|
||||
if allowUserNameChange
|
||||
input.js-profile-username(type="text" value=username)
|
||||
else
|
||||
input.js-profile-username(type="text" value=username readonly)
|
||||
label
|
||||
| {{_ 'initials'}}
|
||||
input.js-profile-initials(type="text" value=profile.initials)
|
||||
|
|
|
|||
|
|
@ -24,6 +24,9 @@ Template.editProfilePopup.helpers({
|
|||
allowEmailChange() {
|
||||
return AccountSettings.findOne('accounts-allowEmailChange').booleanValue;
|
||||
},
|
||||
allowUserNameChange() {
|
||||
return AccountSettings.findOne('accounts-allowUserNameChange').booleanValue;
|
||||
},
|
||||
});
|
||||
|
||||
Template.editProfilePopup.events({
|
||||
|
|
|
|||
|
|
@ -434,6 +434,7 @@
|
|||
"no": "لا",
|
||||
"accounts": "الحسابات",
|
||||
"accounts-allowEmailChange": "السماح بتغيير البريد الإلكتروني",
|
||||
"accounts-allowUserNameChange": "اسمح بتغيير اسم المستخدم",
|
||||
"createdAt": "Created at",
|
||||
"verified": "Verified",
|
||||
"active": "Active",
|
||||
|
|
|
|||
|
|
@ -434,6 +434,7 @@
|
|||
"no": "Не",
|
||||
"accounts": "Профили",
|
||||
"accounts-allowEmailChange": "Разреши промяна на имейла",
|
||||
"accounts-allowUserNameChange": "Разрешаване на Промяна на Потребителско име",
|
||||
"createdAt": "Създаден на",
|
||||
"verified": "Потвърден",
|
||||
"active": "Активен",
|
||||
|
|
|
|||
|
|
@ -434,6 +434,7 @@
|
|||
"no": "No",
|
||||
"accounts": "Accounts",
|
||||
"accounts-allowEmailChange": "Allow Email Change",
|
||||
"accounts-allowUserNameChange": "Allow Username Change",
|
||||
"createdAt": "Created at",
|
||||
"verified": "Verified",
|
||||
"active": "Active",
|
||||
|
|
|
|||
|
|
@ -434,6 +434,7 @@
|
|||
"no": "No",
|
||||
"accounts": "Comptes",
|
||||
"accounts-allowEmailChange": "Permet modificar correu electrònic",
|
||||
"accounts-allowUserNameChange": "Permet canviar el nom d'usuari",
|
||||
"createdAt": "Creat ",
|
||||
"verified": "Verificat",
|
||||
"active": "Actiu",
|
||||
|
|
|
|||
|
|
@ -434,6 +434,7 @@
|
|||
"no": "Ne",
|
||||
"accounts": "Účty",
|
||||
"accounts-allowEmailChange": "Povolit změnu Emailu",
|
||||
"accounts-allowUserNameChange": "Povolit změnu jména uživatele",
|
||||
"createdAt": "Vytvořeno v",
|
||||
"verified": "Ověřen",
|
||||
"active": "Aktivní",
|
||||
|
|
|
|||
|
|
@ -434,6 +434,7 @@
|
|||
"no": "Nein",
|
||||
"accounts": "Konten",
|
||||
"accounts-allowEmailChange": "Ändern der E-Mailadresse zulassen",
|
||||
"accounts-allowUserNameChange": "Erlaube Benutzernamen ändern",
|
||||
"createdAt": "Erstellt am",
|
||||
"verified": "Geprüft",
|
||||
"active": "Aktiv",
|
||||
|
|
|
|||
|
|
@ -434,6 +434,7 @@
|
|||
"no": "Όχι",
|
||||
"accounts": "Λογαριασμοί",
|
||||
"accounts-allowEmailChange": "Allow Email Change",
|
||||
"accounts-allowUserNameChange": "Allow Username Change",
|
||||
"createdAt": "Created at",
|
||||
"verified": "Verified",
|
||||
"active": "Active",
|
||||
|
|
|
|||
|
|
@ -434,6 +434,7 @@
|
|||
"no": "No",
|
||||
"accounts": "Accounts",
|
||||
"accounts-allowEmailChange": "Allow Email Change",
|
||||
"accounts-allowUserNameChange": "Allow Username Change",
|
||||
"createdAt": "Created at",
|
||||
"verified": "Verified",
|
||||
"active": "Active",
|
||||
|
|
|
|||
|
|
@ -434,6 +434,7 @@
|
|||
"no": "No",
|
||||
"accounts": "Accounts",
|
||||
"accounts-allowEmailChange": "Allow Email Change",
|
||||
"accounts-allowUserNameChange": "Allow Username Change",
|
||||
"createdAt": "Created at",
|
||||
"verified": "Verified",
|
||||
"active": "Active",
|
||||
|
|
|
|||
|
|
@ -434,6 +434,7 @@
|
|||
"no": "No",
|
||||
"accounts": "Accounts",
|
||||
"accounts-allowEmailChange": "Allow Email Change",
|
||||
"accounts-allowUserNameChange": "Allow Username Change",
|
||||
"createdAt": "Created at",
|
||||
"verified": "Verified",
|
||||
"active": "Active",
|
||||
|
|
|
|||
|
|
@ -434,6 +434,7 @@
|
|||
"no": "No",
|
||||
"accounts": "Cuentas",
|
||||
"accounts-allowEmailChange": "Permitir Cambio de Email",
|
||||
"accounts-allowUserNameChange": "Permitir Cambio de Username",
|
||||
"createdAt": "Creado en",
|
||||
"verified": "Verificado",
|
||||
"active": "Activo",
|
||||
|
|
|
|||
|
|
@ -434,6 +434,7 @@
|
|||
"no": "No",
|
||||
"accounts": "Cuentas",
|
||||
"accounts-allowEmailChange": "Permitir cambiar el correo electrónico",
|
||||
"accounts-allowUserNameChange": "Permitir Cambio de Username",
|
||||
"createdAt": "Creado en",
|
||||
"verified": "Verificado",
|
||||
"active": "Activo",
|
||||
|
|
|
|||
|
|
@ -434,6 +434,7 @@
|
|||
"no": "Ez",
|
||||
"accounts": "Kontuak",
|
||||
"accounts-allowEmailChange": "Baimendu e-mail aldaketa",
|
||||
"accounts-allowUserNameChange": "Baimendu erabiltzaile-izena aldatzea",
|
||||
"createdAt": "Noiz sortua",
|
||||
"verified": "Egiaztatuta",
|
||||
"active": "Gaituta",
|
||||
|
|
|
|||
|
|
@ -434,6 +434,7 @@
|
|||
"no": "خیر",
|
||||
"accounts": "حسابها",
|
||||
"accounts-allowEmailChange": "اجازه تغییر رایانامه",
|
||||
"accounts-allowUserNameChange": "اجازه تغییر ایمیل",
|
||||
"createdAt": "ساخته شده در",
|
||||
"verified": "معتبر",
|
||||
"active": "فعال",
|
||||
|
|
|
|||
|
|
@ -434,6 +434,7 @@
|
|||
"no": "Ei",
|
||||
"accounts": "Tilit",
|
||||
"accounts-allowEmailChange": "Salli sähköpostiosoitteen muuttaminen",
|
||||
"accounts-allowUserNameChange": "Salli käyttäjänimesi muutos",
|
||||
"createdAt": "Luotu",
|
||||
"verified": "Varmistettu",
|
||||
"active": "Aktiivinen",
|
||||
|
|
|
|||
|
|
@ -434,6 +434,7 @@
|
|||
"no": "Non",
|
||||
"accounts": "Comptes",
|
||||
"accounts-allowEmailChange": "Autoriser le changement d'adresse mail",
|
||||
"accounts-allowUserNameChange": "Autoriser le changement de nom d'utilisateur",
|
||||
"createdAt": "Créé le",
|
||||
"verified": "Vérifié",
|
||||
"active": "Actif",
|
||||
|
|
|
|||
|
|
@ -434,6 +434,7 @@
|
|||
"no": "No",
|
||||
"accounts": "Accounts",
|
||||
"accounts-allowEmailChange": "Allow Email Change",
|
||||
"accounts-allowUserNameChange": "Allow Username Change",
|
||||
"createdAt": "Created at",
|
||||
"verified": "Verified",
|
||||
"active": "Active",
|
||||
|
|
|
|||
|
|
@ -434,6 +434,7 @@
|
|||
"no": "לא",
|
||||
"accounts": "חשבונות",
|
||||
"accounts-allowEmailChange": "אפשר שינוי דוא\"ל",
|
||||
"accounts-allowUserNameChange": "אפשר שינוי שם משתמש",
|
||||
"createdAt": "נוצר ב",
|
||||
"verified": "עבר אימות",
|
||||
"active": "פעיל",
|
||||
|
|
|
|||
|
|
@ -434,6 +434,7 @@
|
|||
"no": "Nem",
|
||||
"accounts": "Fiókok",
|
||||
"accounts-allowEmailChange": "E-mail megváltoztatásának engedélyezése",
|
||||
"accounts-allowUserNameChange": "A Felhasználónév módosításának engedélyezése",
|
||||
"createdAt": "Létrehozva",
|
||||
"verified": "Ellenőrizve",
|
||||
"active": "Aktív",
|
||||
|
|
|
|||
|
|
@ -434,6 +434,7 @@
|
|||
"no": "No",
|
||||
"accounts": "Accounts",
|
||||
"accounts-allowEmailChange": "Allow Email Change",
|
||||
"accounts-allowUserNameChange": "Allow Username Change",
|
||||
"createdAt": "Created at",
|
||||
"verified": "Verified",
|
||||
"active": "Active",
|
||||
|
|
|
|||
|
|
@ -434,6 +434,7 @@
|
|||
"no": "No",
|
||||
"accounts": "Accounts",
|
||||
"accounts-allowEmailChange": "Allow Email Change",
|
||||
"accounts-allowUserNameChange": "Allow Username Change",
|
||||
"createdAt": "Created at",
|
||||
"verified": "Verified",
|
||||
"active": "Active",
|
||||
|
|
|
|||
|
|
@ -434,6 +434,7 @@
|
|||
"no": "Mba",
|
||||
"accounts": "Accounts",
|
||||
"accounts-allowEmailChange": "Allow Email Change",
|
||||
"accounts-allowUserNameChange": "Allow Username Change",
|
||||
"createdAt": "Ekere na",
|
||||
"verified": "Verified",
|
||||
"active": "Active",
|
||||
|
|
|
|||
|
|
@ -434,6 +434,7 @@
|
|||
"no": "No",
|
||||
"accounts": "Profili",
|
||||
"accounts-allowEmailChange": "Permetti modifica dell'email",
|
||||
"accounts-allowUserNameChange": "Consenti modifica nome utente",
|
||||
"createdAt": "creato alle",
|
||||
"verified": "Verificato",
|
||||
"active": "Attivo",
|
||||
|
|
|
|||
|
|
@ -434,6 +434,7 @@
|
|||
"no": "いいえ",
|
||||
"accounts": "アカウント",
|
||||
"accounts-allowEmailChange": "メールアドレスの変更を許可",
|
||||
"accounts-allowUserNameChange": "ユーザー名変更を許可する",
|
||||
"createdAt": "Created at",
|
||||
"verified": "Verified",
|
||||
"active": "Active",
|
||||
|
|
|
|||
|
|
@ -434,6 +434,7 @@
|
|||
"no": "No",
|
||||
"accounts": "Accounts",
|
||||
"accounts-allowEmailChange": "Allow Email Change",
|
||||
"accounts-allowUserNameChange": "Allow Username Change",
|
||||
"createdAt": "Created at",
|
||||
"verified": "Verified",
|
||||
"active": "Active",
|
||||
|
|
|
|||
|
|
@ -434,6 +434,7 @@
|
|||
"no": "No",
|
||||
"accounts": "Accounts",
|
||||
"accounts-allowEmailChange": "Allow Email Change",
|
||||
"accounts-allowUserNameChange": "Allow Username Change",
|
||||
"createdAt": "Created at",
|
||||
"verified": "Verified",
|
||||
"active": "Active",
|
||||
|
|
|
|||
|
|
@ -434,6 +434,7 @@
|
|||
"no": "No",
|
||||
"accounts": "Accounts",
|
||||
"accounts-allowEmailChange": "Allow Email Change",
|
||||
"accounts-allowUserNameChange": "Allow Username Change",
|
||||
"createdAt": "Created at",
|
||||
"verified": "Verified",
|
||||
"active": "Active",
|
||||
|
|
|
|||
|
|
@ -434,6 +434,7 @@
|
|||
"no": "No",
|
||||
"accounts": "Accounts",
|
||||
"accounts-allowEmailChange": "Allow Email Change",
|
||||
"accounts-allowUserNameChange": "Allow Username Change",
|
||||
"createdAt": "Created at",
|
||||
"verified": "Verified",
|
||||
"active": "Active",
|
||||
|
|
|
|||
|
|
@ -434,6 +434,7 @@
|
|||
"no": "Nee",
|
||||
"accounts": "Accounts",
|
||||
"accounts-allowEmailChange": "Sta E-mailadres wijzigingen toe",
|
||||
"accounts-allowUserNameChange": "Gebruikersnaam wijzigen toestaan",
|
||||
"createdAt": "Gemaakt op",
|
||||
"verified": "Geverifieerd",
|
||||
"active": "Actief",
|
||||
|
|
|
|||
|
|
@ -434,6 +434,7 @@
|
|||
"no": "Nie",
|
||||
"accounts": "Konto",
|
||||
"accounts-allowEmailChange": "Zezwól na zmianę adresu email",
|
||||
"accounts-allowUserNameChange": "Zezwalaj na zmianę użytkownika",
|
||||
"createdAt": "Stworzono o",
|
||||
"verified": "Zweryfikowane",
|
||||
"active": "Aktywny",
|
||||
|
|
|
|||
|
|
@ -434,6 +434,7 @@
|
|||
"no": "Não",
|
||||
"accounts": "Contas",
|
||||
"accounts-allowEmailChange": "Permitir Mudança de Email",
|
||||
"accounts-allowUserNameChange": "Permitir Mudança de Username",
|
||||
"createdAt": "Criado em",
|
||||
"verified": "Verificado",
|
||||
"active": "Ativo",
|
||||
|
|
|
|||
|
|
@ -434,6 +434,7 @@
|
|||
"no": "Não",
|
||||
"accounts": "Contas",
|
||||
"accounts-allowEmailChange": "Allow Email Change",
|
||||
"accounts-allowUserNameChange": "Allow Username Change",
|
||||
"createdAt": "Created at",
|
||||
"verified": "Verificado",
|
||||
"active": "Ativo",
|
||||
|
|
|
|||
|
|
@ -434,6 +434,7 @@
|
|||
"no": "No",
|
||||
"accounts": "Accounts",
|
||||
"accounts-allowEmailChange": "Allow Email Change",
|
||||
"accounts-allowUserNameChange": "Allow Username Change",
|
||||
"createdAt": "Created at",
|
||||
"verified": "Verified",
|
||||
"active": "Active",
|
||||
|
|
|
|||
|
|
@ -434,6 +434,7 @@
|
|||
"no": "Нет",
|
||||
"accounts": "Учетные записи",
|
||||
"accounts-allowEmailChange": "Разрешить изменение электронной почты",
|
||||
"accounts-allowUserNameChange": "Разрешить изменение имени пользователя",
|
||||
"createdAt": "Создано на",
|
||||
"verified": "Проверено",
|
||||
"active": "Действующий",
|
||||
|
|
|
|||
|
|
@ -434,6 +434,7 @@
|
|||
"no": "No",
|
||||
"accounts": "Accounts",
|
||||
"accounts-allowEmailChange": "Allow Email Change",
|
||||
"accounts-allowUserNameChange": "Allow Username Change",
|
||||
"createdAt": "Created at",
|
||||
"verified": "Verified",
|
||||
"active": "Active",
|
||||
|
|
|
|||
|
|
@ -434,6 +434,7 @@
|
|||
"no": "Nej",
|
||||
"accounts": "Konton",
|
||||
"accounts-allowEmailChange": "Tillåt e-poständring",
|
||||
"accounts-allowUserNameChange": "Tillåt användarnamnändring",
|
||||
"createdAt": "Skapad vid",
|
||||
"verified": "Verifierad",
|
||||
"active": "Aktiv",
|
||||
|
|
|
|||
|
|
@ -434,6 +434,7 @@
|
|||
"no": "No",
|
||||
"accounts": "Accounts",
|
||||
"accounts-allowEmailChange": "Allow Email Change",
|
||||
"accounts-allowUserNameChange": "Allow Username Change",
|
||||
"createdAt": "Created at",
|
||||
"verified": "Verified",
|
||||
"active": "Active",
|
||||
|
|
|
|||
|
|
@ -434,6 +434,7 @@
|
|||
"no": "No",
|
||||
"accounts": "Accounts",
|
||||
"accounts-allowEmailChange": "Allow Email Change",
|
||||
"accounts-allowUserNameChange": "Allow Username Change",
|
||||
"createdAt": "Created at",
|
||||
"verified": "Verified",
|
||||
"active": "Active",
|
||||
|
|
|
|||
|
|
@ -434,6 +434,7 @@
|
|||
"no": "Hayır",
|
||||
"accounts": "Hesaplar",
|
||||
"accounts-allowEmailChange": "E-posta Değiştirmeye İzin Ver",
|
||||
"accounts-allowUserNameChange": "Kullanıcı Adının Değiştirilmesine İzin Ver",
|
||||
"createdAt": "Oluşturulma tarihi",
|
||||
"verified": "Doğrulanmış",
|
||||
"active": "Aktif",
|
||||
|
|
|
|||
|
|
@ -434,6 +434,7 @@
|
|||
"no": "No",
|
||||
"accounts": "Accounts",
|
||||
"accounts-allowEmailChange": "Allow Email Change",
|
||||
"accounts-allowUserNameChange": "Allow Username Change",
|
||||
"createdAt": "Created at",
|
||||
"verified": "Verified",
|
||||
"active": "Active",
|
||||
|
|
|
|||
|
|
@ -434,6 +434,7 @@
|
|||
"no": "No",
|
||||
"accounts": "Accounts",
|
||||
"accounts-allowEmailChange": "Allow Email Change",
|
||||
"accounts-allowUserNameChange": "Allow Username Change",
|
||||
"createdAt": "Created at",
|
||||
"verified": "Verified",
|
||||
"active": "Active",
|
||||
|
|
|
|||
|
|
@ -434,6 +434,7 @@
|
|||
"no": "否",
|
||||
"accounts": "账号",
|
||||
"accounts-allowEmailChange": "允许邮箱变更",
|
||||
"accounts-allowUserNameChange": "允许用户名更改",
|
||||
"createdAt": "创建于",
|
||||
"verified": "已验证",
|
||||
"active": "活跃",
|
||||
|
|
|
|||
|
|
@ -434,6 +434,7 @@
|
|||
"no": "否",
|
||||
"accounts": "帳號",
|
||||
"accounts-allowEmailChange": "准許變更電子信箱",
|
||||
"accounts-allowUserNameChange": "允许用户名更改",
|
||||
"createdAt": "Created at",
|
||||
"verified": "Verified",
|
||||
"active": "Active",
|
||||
|
|
|
|||
|
|
@ -29,5 +29,11 @@ if (Meteor.isServer) {
|
|||
sort: 0,
|
||||
},
|
||||
});
|
||||
AccountSettings.upsert({_id: 'accounts-allowUserNameChange'}, {
|
||||
$setOnInsert: {
|
||||
booleanValue: false,
|
||||
sort: 1,
|
||||
},
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue