Blame view

collections/example.js 667 Bytes
3b214be5e   Ryan Glover   Convert all Coffe...
1
2
3
4
5
6
7
  Example = new Meteor.Collection('example');
  
  /*
  * Allow
  */
  
  Example.allow({
3e761f11b   Ryan Glover   Update example co...
8
9
10
    insert: function(){
      // Disallow inserts on the client by default.
      return false;
3b214be5e   Ryan Glover   Convert all Coffe...
11
    },
3e761f11b   Ryan Glover   Update example co...
12
13
14
    update: function(){
      // Disallow updates on the client by default.
      return false;
3b214be5e   Ryan Glover   Convert all Coffe...
15
    },
3e761f11b   Ryan Glover   Update example co...
16
17
18
    remove: function(){
      // Disallow removes on the client by default.
      return false;
3b214be5e   Ryan Glover   Convert all Coffe...
19
20
21
22
23
24
25
26
    }
  });
  
  /*
  * Deny
  */
  
  Example.deny({
3e761f11b   Ryan Glover   Update example co...
27
28
29
    insert: function(){
      // Deny inserts on the client by default.
      return true;
3b214be5e   Ryan Glover   Convert all Coffe...
30
    },
3e761f11b   Ryan Glover   Update example co...
31
32
33
    update: function(){
      // Deny updates on the client by default.
      return true;
3b214be5e   Ryan Glover   Convert all Coffe...
34
    },
3e761f11b   Ryan Glover   Update example co...
35
36
37
    remove: function(){
      // Deny removes on the client by default.
      return true;
3b214be5e   Ryan Glover   Convert all Coffe...
38
39
    }
  });