achannarasappa / sails-restricted-attributes Goto Github PK
View Code? Open in Web Editor NEWService for SailsJS framework that allows you to restrict access to certain model attributes based on user permissions
License: MIT License
Service for SailsJS framework that allows you to restrict access to certain model attributes based on user permissions
License: MIT License
Hi,
I executed your code.
I am working on a POC - for sails restricted attributes
(lets say we have 5 fields in a collection..and one query requires first 3 fields out of the 5
and the second query requires last 3 fields out of the 5 then toJson can satisfy either one of the requirement). Figuring out your code.
I gave this input and created one user
I gave the input through the console :
/home/soundarya/Downloads/manytomany/node_modules/sails-mongo/node_modules/mongodb/lib/mongodb/connection/base.js:246
throw message;
^
ReferenceError: RestrictedAttrService is not defined
at /home/soundarya/Downloads/manytomany/api/controllers/UserController.js:13:16
at returnResults (/home/soundarya/Downloads/manytomany/node_modules/waterline/lib/waterline/query/finders/basic.js:168:9)
at /home/soundarya/Downloads/manytomany/node_modules/waterline/lib/waterline/query/finders/basic.js:74:16
at /home/soundarya/Downloads/manytomany/node_modules/waterline/lib/waterline/query/finders/operations.js:82:7
at Object.async.each (/home/soundarya/Downloads/manytomany/node_modules/waterline/node_modules/async/lib/async.js:121:20)
at /home/soundarya/Downloads/manytomany/node_modules/waterline/lib/waterline/query/finders/operations.js:425:11
at /home/soundarya/Downloads/manytomany/node_modules/waterline/lib/waterline/query/finders/operations.js:564:5
at Object.async.each (/home/soundarya/Downloads/manytomany/node_modules/waterline/node_modules/async/lib/async.js:121:20)
at _buildChildOpts (/home/soundarya/Downloads/manytomany/node_modules/waterline/lib/waterline/query/finders/operations.js:453:9)
at _execChildOpts (/home/soundarya/Downloads/manytomany/node_modules/waterline/lib/waterline/query/finders/operations.js:421:8)
at /home/soundarya/Downloads/manytomany/node_modules/waterline/lib/waterline/query/finders/operations.js:80:10
at bound (/home/soundarya/Downloads/manytomany/node_modules/waterline/node_modules/lodash/dist/lodash.js:957:21)
at applyInOriginalCtx (/home/soundarya/Downloads/manytomany/node_modules/waterline/lib/waterline/utils/normalize.js:421:80)
at wrappedCallback (/home/soundarya/Downloads/manytomany/node_modules/waterline/lib/waterline/utils/normalize.js:320:18)
at callback.success (/home/soundarya/Downloads/manytomany/node_modules/waterline/node_modules/switchback/lib/normalize.js:33:31)
at _switch (/home/soundarya/Downloads/manytomany/node_modules/waterline/node_modules/switchback/lib/factory.js:48:28)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.