Open saravanannnallasamy opened 7 years ago
Review.find().populate('packages').exec(function(err,record){ if (err) throw err; sails.log.debug('record data : ' +util.inspect(record, {showHidden: true,depth: null})); return res.ok(record); });
For Review table i have read permission, but for package table [ populate('packages') ] I don't have read permission but I getting all datas.
[ { "packages": { "year": 2017, "type": 2, "id": 1, "createdAt": "2017-07-10T07:12:05.000Z", "updatedAt": "2017-07-10T07:12:05.000Z", "createdBy": 4, "owner": 4 }, "createdBy": 4, "owner": 4, "title": "Suzuki Gixxer", "text": "manual transmission", "category": "bikes", "id": 3, "createdAt": "2017-07-10T07:12:05.000Z", "updatedAt": "2017-07-10T07:12:05.000Z" } ]
For Review table i have read permission, but for package table [ populate('packages') ] I don't have read permission but I getting all datas.