Skip to content
Snippets Groups Projects
Unverified Commit cb7c05a0 authored by Diego Sampaio's avatar Diego Sampaio
Browse files

Obbey to settings properties (#19020)

parent 6091df3b
No related branches found
No related tags found
No related merge requests found
...@@ -32,7 +32,10 @@ Permissions.on('change', ({ clientAction, id, data, diff }) => { ...@@ -32,7 +32,10 @@ Permissions.on('change', ({ clientAction, id, data, diff }) => {
// if the permission changes, the effect on the visible settings depends on the role affected. // if the permission changes, the effect on the visible settings depends on the role affected.
// The selected-settings-based consumers have to react accordingly and either add or remove the // The selected-settings-based consumers have to react accordingly and either add or remove the
// setting from the user's collection // setting from the user's collection
const setting = Settings.findOneById(data.settingId); const setting = Settings.findOneNotHiddenById(data.settingId);
if (!setting) {
return;
}
Notifications.notifyLoggedInThisInstance( Notifications.notifyLoggedInThisInstance(
'private-settings-changed', 'private-settings-changed',
'updated', 'updated',
......
...@@ -17,6 +17,10 @@ Settings.on('change', ({ clientAction, id, data, diff }) => { ...@@ -17,6 +17,10 @@ Settings.on('change', ({ clientAction, id, data, diff }) => {
properties: setting.properties, properties: setting.properties,
}; };
if (setting.hidden) {
return;
}
if (setting.public === true) { if (setting.public === true) {
Notifications.notifyAllInThisInstance('public-settings-changed', clientAction, value); Notifications.notifyAllInThisInstance('public-settings-changed', clientAction, value);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment