diff --git a/History.md b/History.md index 3db302fed6..b38f30a6d5 100644 --- a/History.md +++ b/History.md @@ -1,5 +1,11 @@ ## vNEXT +* `restrictCreationByEmail` option in `Accounts.config` to restrict new users to + emails of specific domain (eg. only users with @meteor.com emails). + +* Pass an index and the cursor itself to the callbacks in `cursor.forEach` and + `cursor.map`, just like the corresponding `Array` methods. #63 + * Better error when passing a string to {{#each}}. #722 * Write dates to Mongo as ISODate rather than Integer; existing data can be @@ -14,10 +20,22 @@ 0.6.5. (A bug prevented the 0.6.5 reimplementation of `register_extension` from working properly anyway.) +* Support using an HTTP proxy in the `meteor` command line tool. This + allows the `update`, `deploy`, `logs`, and `mongo` commands to work + behind a proxy. Use the standard `http_proxy` environment variable to + specify your proxy endpoint. #429, #689, #1338 + * Build Linux binaries on an older Linux machine. Meteor now supports running on Linux machines with glibc 2.9 or newer (Ubuntu 10.04+, RHEL and CentOS 6+, Fedora 10+, Debian 6+). +* Support OAuth1 services that require request token secrets as well as + authentication token secrets. #1253 + +* Add `browser-policy` package for configuring and sending Content Security + Policy and X-Frame-Options HTTP headers. + + ## v0.6.5.1 * Fix syntax errors on lines that end with a backslash. #1326 diff --git a/docs/client/api.html b/docs/client/api.html index 3aa992a512..9fa58c4fbb 100644 --- a/docs/client/api.html +++ b/docs/client/api.html @@ -62,9 +62,9 @@ that Meteor will call each time a client subscribes to the name. Publish functions can return a [`Collection.Cursor`](#meteor_collection_cursor), in which case Meteor -will publish that cursor's documents. You can also return an array of -`Collection.Cursor`s, in which case Meteor will publish all of the -cursors. +will publish that cursor's documents to each subscribed client. You can +also return an array of `Collection.Cursor`s, in which case Meteor will +publish all of the cursors. {{#warning}} If you return multiple cursors in an array, they currently must all be from @@ -92,16 +92,15 @@ different collections. We hope to lift this restriction in a future release. ]; }); -Otherwise, the publish function should call the functions -[`added`](#publish_added) (when a new document is added to the published record -set), [`changed`](#publish_changed) (when some fields on a document in the -record set are changed or cleared), and [`removed`](#publish_removed) (when -documents are removed from the published record set) to inform subscribers about -documents. These methods are provided by `this` in your publish function. - - - - +Alternatively, a publish function can directly control its published +record set by calling the functions [`added`](#publish_added) (to add a +new document to the published record set), [`changed`](#publish_changed) +(to change or clear some fields on a document already in the published +record set), and [`removed`](#publish_removed) (to remove documents from +the published record set). Publish functions that use these functions +should also call [`ready`](#publish_ready) once the initial record set +is complete. These methods are provided by `this` in your publish +function. Example: @@ -966,6 +965,8 @@ cursor, use [`forEach`](#foreach), [`map`](#map), or [`fetch`](#fetch). {{> api_box cursor_foreach}} +This interface is compatible with [Array.forEach](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach). + When called from a reactive computation, `forEach` registers dependencies on the matching documents. @@ -981,6 +982,8 @@ Examples: {{> api_box cursor_map}} +This interface is compatible with [Array.map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map). + When called from a reactive computation, `map` registers dependencies on the matching documents. diff --git a/docs/client/api.js b/docs/client/api.js index 1ca9cbce0f..4a7402824a 100644 --- a/docs/client/api.js +++ b/docs/client/api.js @@ -482,7 +482,7 @@ Template.api.meteor_collection = { options: [ {name: "connection", type: "Object", - descr: "The Meteor connection that will manage this collection. Uses the default connection if not specified. Pass `null` to specify no connection. Unmanaged (`name` is null) collections cannot specify a connection." + descr: "The server connection that will manage this collection. Uses the default connection if not specified. Pass the return value of calling [`DDP.connect`](#ddp_connect) to specify a different server. Pass `null` to specify no connection. Unmanaged (`name` is null) collections cannot specify a connection." }, {name: "idGeneration", type: "String", @@ -675,25 +675,31 @@ Template.api.cursor_fetch = { Template.api.cursor_foreach = { id: "foreach", - name: "cursor.forEach(callback)", + name: "cursor.forEach(callback, [thisArg])", locus: "Anywhere", descr: ["Call `callback` once for each matching document, sequentially and synchronously."], args: [ {name: "callback", type: "Function", - descr: "Function to call."} + descr: "Function to call. It will be called with three arguments: the document, a 0-based index, and cursor itself."}, + {name: "thisArg", + type: "Any", + descr: "An object which will be the value of `this` inside `callback`."} ] }; Template.api.cursor_map = { id: "map", - name: "cursor.map(callback)", + name: "cursor.map(callback, [thisArg])", locus: "Anywhere", descr: ["Map callback over all matching documents. Returns an Array."], args: [ {name: "callback", type: "Function", - descr: "Function to call."} + descr: "Function to call. It will be called with three arguments: the document, a 0-based index, and cursor itself."}, + {name: "thisArg", + type: "Any", + descr: "An object which will be the value of `this` inside `callback`."} ] }; @@ -1100,6 +1106,11 @@ Template.api.accounts_config = { name: "forbidClientAccountCreation", type: "Boolean", descr: "Calls to [`createUser`](#accounts_createuser) from the client will be rejected. In addition, if you are using [accounts-ui](#accountsui), the \"Create account\" link will not be available." + }, + { + name: "restrictCreationByEmail", + type: "String", + descr: "If set, only allow new users with an email in the specified domain. Works with password-based sign-in and external services that expose email addresses (Google, Facebook, GitHub). All existing users still can log in after enabling this option. Example: `Accounts.config({ restrictCreationByEmail: 'school.edu' })`." } ] }; diff --git a/docs/client/concepts.html b/docs/client/concepts.html index 61d47d7c18..67e13a9852 100644 --- a/docs/client/concepts.html +++ b/docs/client/concepts.html @@ -824,9 +824,9 @@ To get started, run $ meteor bundle myapp.tgz This command will generate a fully-contained Node.js application in the form of -a tarball. To run this application, you need to provide Node.js 0.8 and a +a tarball. To run this application, you need to provide Node.js 0.10 and a MongoDB server. (The current release of Meteor has been tested with Node -0.8.24.) You can then run the application by invoking node, specifying the HTTP +0.10.19.) You can then run the application by invoking node, specifying the HTTP port for the application to listen on, and the MongoDB endpoint. If you don't already have a MongoDB server, we can recommend our friends at [MongoHQ](http://mongohq.com). diff --git a/docs/client/docs.js b/docs/client/docs.js index c057ef71bd..3ac001e554 100644 --- a/docs/client/docs.js +++ b/docs/client/docs.js @@ -335,6 +335,7 @@ var toc = [ "audit-argument-checks", "backbone", "bootstrap", + "browser-policy", "coffeescript", "d3", "force-ssl", diff --git a/docs/client/packages.html b/docs/client/packages.html index 0ee701bbe8..077e4f1cd1 100644 --- a/docs/client/packages.html +++ b/docs/client/packages.html @@ -22,6 +22,7 @@ and removed with: {{> pkg_audit_argument_checks}} {{> pkg_backbone}} {{> pkg_bootstrap}} +{{> pkg_browser_policy}} {{> pkg_coffeescript}} {{> pkg_d3}} {{> pkg_force_ssl}} diff --git a/docs/client/packages/browser-policy.html b/docs/client/packages/browser-policy.html new file mode 100644 index 0000000000..f7676e7445 --- /dev/null +++ b/docs/client/packages/browser-policy.html @@ -0,0 +1,156 @@ +