// Generated by CoffeeScript 1.3.3 module.exports.queries = function(store) { return store.query.expose('users', 'withId', function(id) { return this.byId(id); }); }; module.exports.accessControl = function(store) { store.accessControl = true; store.readPathAccess('users.*', function() { var captures, next; if (!(this.session && this.session.userId)) { return; } captures = arguments[0]; next = arguments[arguments.length - 1]; return next(captures === this.session.userId); }); return store.writeAccess('*', 'users.*', function() { var captures, next, pathArray; if (!(this.session && this.session.userId)) { return; } captures = arguments[0]; next = arguments[arguments.length - 1]; pathArray = captures.split('.'); return next(pathArray[0] === this.session.userId); }); };