Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/apiko-dev/publish-authorized
Publish only for authorized users or using custom security check
https://github.com/apiko-dev/publish-authorized
Last synced: about 2 months ago
JSON representation
Publish only for authorized users or using custom security check
- Host: GitHub
- URL: https://github.com/apiko-dev/publish-authorized
- Owner: apiko-dev
- License: mit
- Created: 2015-10-22T11:38:13.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2016-01-20T14:24:29.000Z (almost 9 years ago)
- Last Synced: 2023-02-27T07:07:49.427Z (almost 2 years ago)
- Language: JavaScript
- Homepage: https://atmospherejs.com/jss/publish-authorized
- Size: 10.7 KB
- Stars: 1
- Watchers: 12
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Publish Authorized
Enables publish data only to authorized users
[![Meteor Icon](http://icon.meteor.com/package/jss:publish-authorized)](https://atmospherejs.com/jss/publish-authorized)
## Examples
```javascript
//enable access to MyCollection only for authorized users
Meteor.publishAuthorized('mySecuredPublish', function (category) {
return MyCollection.find({category: category});
});//enable access to MyCollection only for specific users using custom check
Meteor.publishAuthorized('mySecuredPublish', function (category) {
return MyCollection.find({category: category});
}, function (userId) {
return customAccessCheckForMyCollection(userId);
});
```## License
Note that this project is distributed under the [MIT License](LICENSE).
Made by [![Professional Meteor Development Studio](http://s30.postimg.org/jfno1g71p/jss_xs.png)](http://jssolutionsdev.com) - [Professional Meteor Development Company](http://jssolutionsdev.com)