mirror of
https://github.com/wekan/wekan.git
synced 2025-12-31 14:48:48 +01:00
Admin Panel/Settings/Accounts: Hide system messages of all users.
Thanks to bbyszio, r4nc0r and xet7 ! Related #3345
This commit is contained in:
parent
5f53f8cc01
commit
a249ffc805
4 changed files with 43 additions and 7 deletions
|
|
@ -797,6 +797,25 @@ Meteor.methods({
|
|||
|
||||
if (Meteor.isServer) {
|
||||
Meteor.methods({
|
||||
setAllUsersHideSystemMessages() {
|
||||
if (Meteor.user() && Meteor.user().isAdmin) {
|
||||
// If setting is missing, add it
|
||||
Users.update(
|
||||
{ 'profile.hiddenSystemMessages': { $exists: false } },
|
||||
{ $set: { 'profile.hiddenSystemMessages': true } },
|
||||
{ multi: true },
|
||||
);
|
||||
// If setting is false, set it to true
|
||||
Users.update(
|
||||
{ 'profile.hiddenSystemMessages': false },
|
||||
{ $set: { 'profile.hiddenSystemMessages': true } },
|
||||
{ multi: true },
|
||||
);
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
},
|
||||
setCreateUser(
|
||||
fullname,
|
||||
username,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue