Skip to content

Commit

Permalink
Obbey to settings properties (#19020)
Browse files Browse the repository at this point in the history
  • Loading branch information
sampaiodiego committed Sep 25, 2020
1 parent 6091df3 commit cb7c05a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/authorization/server/streamer/permissions/emitter.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
// The selected-settings-based consumers have to react accordingly and either add or remove the
// setting from the user's collection
const setting = Settings.findOneById(data.settingId);
const setting = Settings.findOneNotHiddenById(data.settingId);
if (!setting) {
return;
}
Notifications.notifyLoggedInThisInstance(
'private-settings-changed',
'updated',
Expand Down
4 changes: 4 additions & 0 deletions server/publications/settings/emitter.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ Settings.on('change', ({ clientAction, id, data, diff }) => {
properties: setting.properties,
};

if (setting.hidden) {
return;
}

if (setting.public === true) {
Notifications.notifyAllInThisInstance('public-settings-changed', clientAction, value);
}
Expand Down

0 comments on commit cb7c05a

Please sign in to comment.