Skip to content
This repository has been archived by the owner on Feb 26, 2021. It is now read-only.

Commit

Permalink
Deny everything
Browse files Browse the repository at this point in the history
  • Loading branch information
Sashko Stubailo committed Nov 11, 2015
1 parent 6f8b603 commit fc1ac60
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
8 changes: 8 additions & 0 deletions packages/lists/lists.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,14 @@ class ListsCollection extends Mongo.Collection {
}

Lists = new ListsCollection('Lists');

// Deny all client-side updates since we will be using methods to manage this collection
Lists.deny({
insert() { return true },
update() { return true },
remove() { return true },
});

Lists.userIdDenormalizer = userIdDenormalizer;

Lists.schema = new SimpleSchema({
Expand Down
7 changes: 7 additions & 0 deletions packages/todos/todos.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@ class TodosCollection extends Mongo.Collection {

Todos = new TodosCollection('Todos');

// Deny all client-side updates since we will be using methods to manage this collection
Todos.deny({
insert() { return true },
update() { return true },
remove() { return true },
});

Todos.schema = new SimpleSchema({
listId: {
type: String,
Expand Down

0 comments on commit fc1ac60

Please sign in to comment.