mirror of
https://github.com/wekan/wekan.git
synced 2025-12-18 00:10:13 +01:00
Add admin setting to prevent users to self deleting their account
This commit is contained in:
parent
84ba42f42e
commit
98e3b0ce77
5 changed files with 31 additions and 2 deletions
|
|
@ -233,12 +233,17 @@ BlazeComponent.extendComponent({
|
|||
$('input[name=allowEmailChange]:checked').val() === 'true';
|
||||
const allowUserNameChange =
|
||||
$('input[name=allowUserNameChange]:checked').val() === 'true';
|
||||
const allowUserDelete =
|
||||
$('input[name=allowUserDelete]:checked').val() === 'true';
|
||||
AccountSettings.update('accounts-allowEmailChange', {
|
||||
$set: { booleanValue: allowEmailChange },
|
||||
});
|
||||
AccountSettings.update('accounts-allowUserNameChange', {
|
||||
$set: { booleanValue: allowUserNameChange },
|
||||
});
|
||||
AccountSettings.update('accounts-allowUserDelete', {
|
||||
$set: { booleanValue: allowUserDelete },
|
||||
});
|
||||
},
|
||||
|
||||
allowEmailChange() {
|
||||
|
|
@ -247,6 +252,9 @@ BlazeComponent.extendComponent({
|
|||
allowUserNameChange() {
|
||||
return AccountSettings.findOne('accounts-allowUserNameChange').booleanValue;
|
||||
},
|
||||
allowUserDelete() {
|
||||
return AccountSettings.findOne('accounts-allowUserDelete').booleanValue;
|
||||
},
|
||||
|
||||
events() {
|
||||
return [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue