mirror of
https://github.com/vale981/grapher
synced 2025-03-12 13:56:38 -04:00
38 lines
771 B
JavaScript
38 lines
771 B
JavaScript
![]() |
import Demo, {DemoPublication, DemoMethod} from './demo.js';
|
||
|
import Intersect, { CollectionLink as IntersectLink } from './intersect';
|
||
|
import { Exposure } from 'meteor/cultofcoders:grapher';
|
||
|
|
||
|
Demo.expose({
|
||
|
firewall(filters, options, userId) {
|
||
|
Exposure.restrictFields(filters, options, ['restrictedField']);
|
||
|
filters.isPrivate = false;
|
||
|
},
|
||
|
maxLimit: 2,
|
||
|
maxDepth: 2,
|
||
|
restrictLinks(userId) {
|
||
|
return ['restrictedLink'];
|
||
|
}
|
||
|
});
|
||
|
|
||
|
DemoMethod.expose({
|
||
|
publication: false
|
||
|
});
|
||
|
|
||
|
DemoPublication.expose({
|
||
|
method: false
|
||
|
});
|
||
|
|
||
|
Intersect.expose({
|
||
|
body: {
|
||
|
value: 1,
|
||
|
link: {
|
||
|
value: 1
|
||
|
}
|
||
|
}
|
||
|
});
|
||
|
|
||
|
IntersectLink.expose({
|
||
|
firewall() {
|
||
|
throw new Meteor.Error('I do not allow!')
|
||
|
}
|
||
|
});
|