mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user