Add maintenance banner on UI (#797)

* fix bug on email separator

Signed-off-by: Denis barbaron <denis.barbaron@orange.com>

* allow group name change

Signed-off-by: Denis barbaron <denis.barbaron@orange.com>

* add maintenance banner on UI

Signed-off-by: Denis barbaron <denis.barbaron@orange.com>

* removes unnecessary comments

Signed-off-by: Denis barbaron <denis.barbaron@orange.com>

---------

Signed-off-by: Denis barbaron <denis.barbaron@orange.com>
This commit is contained in:
Denis Barbaron
2024-07-19 10:33:52 +02:00
committed by GitHub
parent cf56911e9f
commit 489ba0427e
17 changed files with 446 additions and 16 deletions

View File

@@ -1,5 +1,5 @@
/**
* Copyright © 2019 code initially contributed by Orange SA, authors: Denis Barbaron - Licensed under the Apache license 2.0
* Copyright © 2019-2024 code initially contributed by Orange SA, authors: Denis Barbaron - Licensed under the Apache license 2.0
**/
const timeutil = require('../../../util/timeutil')
@@ -33,8 +33,9 @@ module.exports = function(pushdev) {
'email'
, 'name'
, 'privilege'
, {groups: ['quotas', 'subscribed']
})
, {groups: ['quotas', 'subscribed']}
, {settings: ['alertMessage']}
)
.changes(), function(err, cursor) {
if (err) {
throw err
@@ -77,6 +78,11 @@ module.exports = function(pushdev) {
!_.isEqual(data.new_val.groups.subscribed, data.old_val.groups.subscribed)) {
targets.push('settings')
}
else if (!_.isEqual(
data.new_val.settings.alertMessage
, data.old_val.settings.alertMessage)) {
targets.push('menu')
}
if (targets.length) {
sendUserChange(
data.new_val