mirror of
https://github.com/vale981/Vulcan
synced 2025-03-05 17:41:43 -05:00
vulcan-users - permissions - filter out array based fields
This commit is contained in:
parent
f0fb423b3f
commit
8e859a38fa
1 changed files with 1 additions and 0 deletions
|
@ -205,6 +205,7 @@ Users.isAdminById = Users.isAdmin;
|
|||
Users.getViewableFields = function (user, collection, document) {
|
||||
return Utils.arrayToFields(_.compact(_.map(collection.simpleSchema()._schema,
|
||||
(field, fieldName) => {
|
||||
if (fieldName.indexOf('.$') > -1) return null;
|
||||
return Users.canReadField(user, field, document) ? fieldName : null;
|
||||
}
|
||||
)));
|
||||
|
|
Loading…
Add table
Reference in a new issue