parent
265b8f3735
commit
ea3adb7ff7
@ -1,20 +1,12 @@ |
||||
Meteor.publish 'settings', (ids = []) -> |
||||
filter = |
||||
hidden: { $ne: true } |
||||
public: true |
||||
|
||||
if ids.length > 0 |
||||
filter._id = |
||||
$in: ids |
||||
|
||||
return RocketChat.models.Settings.find filter, { fields: _id: 1, value: 1 } |
||||
return RocketChat.models.Settings.findNotHiddenPublic(ids) |
||||
|
||||
Meteor.publish 'admin-settings', -> |
||||
unless @userId |
||||
return @ready() |
||||
|
||||
if RocketChat.authz.hasPermission( @userId, 'view-privileged-setting') |
||||
return RocketChat.models.Settings.find({ hidden: { $ne: true } }) |
||||
return RocketChat.models.Settings.findNotHidden() |
||||
else |
||||
return @ready() |
||||
|
||||
|
||||
Loading…
Reference in new issue