In the example "parties" of the application, there is a set of allow / deny rules for the meeting of the Parties. The rule for is insertas follows:
Parties.allow({
insert: function (userId, party) {
return false;
},...
At the same time, the createParty method implements Party.insert ({....}), which is somehow not affected by the rules applicable to the meeting of the Parties.
.....
return Parties.insert({
owner: this.userId,
x: options.x,
y: options.y,
title: options.title,
description: options.description,
public: !! options.public,
invited: [],
rsvps: []
});
.....
Can someone explain why the createParty method is not affected by the rules?
Thank.
source
share