Skip to content

Commit 3140d32

Browse files
committedOct 19, 2015
Removed insecure, and allowed certain writes to posts.
chapter7-2
1 parent f76d91a commit 3140d32

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed
 

‎.meteor/packages

-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ standard-minifiers # JS/CSS minifiers run for production mode
1616
es5-shim # ECMAScript 5 compatibility for older browsers.
1717
ecmascript # Enable ECMAScript2015+ syntax in app code
1818

19-
insecure # Allow all DB writes from clients (for prototyping)
2019
twbs:bootstrap
2120
underscore
2221
iron:router@1.0.0-rc.1

‎.meteor/versions

-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ htmljs@1.0.5
3434
http@1.1.1
3535
ian:accounts-ui-bootstrap-3@1.2.83
3636
id-map@1.0.4
37-
insecure@1.0.4
3837
iron:controller@1.0.12
3938
iron:core@1.0.11
4039
iron:dynamic-template@1.0.12

‎lib/collections/posts.js

+7
Original file line numberDiff line numberDiff line change
@@ -1 +1,8 @@
11
Posts = new Mongo.Collection('posts');
2+
3+
Posts.allow({
4+
insert: function(userId, doc) {
5+
// only allow posting if you are logged in
6+
return !! userId;
7+
}
8+
});

0 commit comments

Comments
 (0)