Make deny, allow example clear as to client/server

As per explanation from Avital Oliver in meteor-talk, I suggest making this change in the doc to make it more clear that the example does not need to reside on *both* the client and server. The title of the sections (deny, allow) from the autoApiBox specify "server". The example got me confused as is.
This commit is contained in:
ogourment
2014-12-07 12:31:09 -05:00
parent c4176547b6
commit 5b88474e0c

View File

@@ -233,7 +233,7 @@ For example, we might say that users can only create new posts if the
impersonate each other.
```
// In a file loaded on the client and server
// In a file loaded on the server (ignored on the client)
Posts.allow({
insert: function (userId, post) {
// can only create posts where you are the author
@@ -284,7 +284,7 @@ For example, if we wanted to override part of our `allow` rule above to exclude
certain post titles:
```
// In a file loaded on the client and server
// In a file loaded on the server (ignored on the client)
Posts.deny({
insert: function (userId, post) {
// Don't allow posts with a certain title