@@ -78,83 +78,90 @@ var STORAGE_BASE_URL = 'https://www.googleapis.com/storage/v1/b';
7878 * });
7979 */
8080function Bucket ( storage , name ) {
81- this . acl = new Acl ( this ) ;
8281 this . metadata = { } ;
8382 this . name = name ;
8483 this . storage = storage ;
8584
8685 if ( ! this . name ) {
8786 throw Error ( 'A bucket name is needed to use Google Cloud Storage.' ) ;
8887 }
89- }
9088
91- /**
92- * Google Cloud Storage uses access control lists (ACLs) to manage object and
93- * bucket access. ACLs are the mechanism you use to share objects with other
94- * users and allow other users to access your buckets and objects.
95- *
96- * An ACL consists of one or more entries, where each entry grants permissions
97- * to a scope. Permissions define the actions that can be performed against an
98- * object or bucket (for example, `READ` or `WRITE`); the scope defines who the
99- * permission applies to (for example, a specific user or group of users).
100- *
101- * For more detailed information, see
102- * [About Access Control Lists](http://goo.gl/6qBBPO).
103- *
104- * The `acl` object on a Bucket instance provides methods to get you a list of
105- * the ACLs defined on your bucket, as well as set, update, and delete them.
106- *
107- * Buckets also have
108- * [default ACLs](https://cloud.google.com/storage/docs/accesscontrol#default)
109- * for all created files. You can add, delete, get, and update scopes and
110- * permissions for these as well. See {module:storage/acl#acl.default}.
111- *
112- * @mixes module:storage/acl
113- */
114- Bucket . prototype . acl = { } ;
89+ /**
90+ * Google Cloud Storage uses access control lists (ACLs) to manage object and
91+ * bucket access. ACLs are the mechanism you use to share objects with other
92+ * users and allow other users to access your buckets and objects.
93+ *
94+ * An ACL consists of one or more entries, where each entry grants permissions
95+ * to a scope. Permissions define the actions that can be performed against an
96+ * object or bucket (for example, `READ` or `WRITE`); the scope defines who
97+ * the permission applies to (for example, a specific user or group of users).
98+ *
99+ * For more detailed information, see
100+ * [About Access Control Lists](http://goo.gl/6qBBPO).
101+ *
102+ * The `acl` object on a Bucket instance provides methods to get you a list of
103+ * the ACLs defined on your bucket, as well as set, update, and delete them.
104+ *
105+ * Buckets also have
106+ * [default ACLs](https://cloud.google.com/storage/docs/accesscontrol#default)
107+ * for all created files. You can add, delete, get, and update scopes and
108+ * permissions for these as well. See {module:storage/acl#acl.default}.
109+ *
110+ * @mixes module:storage/acl
111+ */
112+ this . acl = new Acl ( {
113+ makeReq : this . makeReq_ . bind ( this ) ,
114+ pathPrefix : '/acl'
115+ } ) ;
115116
116- /* jshint ignore:start */
117- /*! Developer Documentation
118- *
119- * Sadly, to generate the documentation properly, this comment block describes a
120- * useless variable named `ignored` and aliases it to `acl.default`. This is
121- * done so the doc building process picks this up, without adding cruft to the
122- * Bucket class itself.
123- */
124- /**
125- * Google Cloud Storage Buckets have [default ACLs](http://goo.gl/YpGdyv)
126- * for all created files. You can add, delete, get, and update scopes and
127- * permissions for these as well. The method signatures and examples are all
128- * the same, after only prefixing the method call with `default`.
129- *
130- * @alias acl.default
131- */
132- var aclDefault = true ;
117+ this . acl . default = new Acl ( {
118+ makeReq : this . makeReq_ . bind ( this ) ,
119+ pathPrefix : '/defaultObjectAcl'
120+ } ) ;
133121
134- /**
135- * Maps to {module:storage/bucket#acl.add}.
136- * @alias acl.default.add
137- */
138- var aclDefaultAdd = true ;
122+ /* jshint ignore:start */
123+ /*! Developer Documentation
124+ *
125+ * Sadly, to generate the documentation properly, this comment block describes
126+ * a useless variable named `ignored` and aliases it to `acl.default`. This is
127+ * done so the doc building process picks this up, without adding cruft to the
128+ * Bucket class itself.
129+ */
130+ /**
131+ * Google Cloud Storage Buckets have [default ACLs](http://goo.gl/YpGdyv) for
132+ * all created files. You can add, delete, get, and update scopes and
133+ * permissions for these as well. The method signatures and examples are all
134+ * the same, after only prefixing the method call with `default`.
135+ *
136+ * @alias acl.default
137+ */
138+ var aclDefault = true ;
139139
140- /**
141- * Maps to {module:storage/bucket#acl.delete }.
142- * @alias acl.default.delete
143- */
144- var aclDefaultDelete = true ;
140+ /**
141+ * Maps to {module:storage/bucket#acl.add }.
142+ * @alias acl.default.add
143+ */
144+ var aclDefaultAdd = true ;
145145
146- /**
147- * Maps to {module:storage/bucket#acl.get }.
148- * @alias acl.default.get
149- */
150- var aclDefaultGet = true ;
146+ /**
147+ * Maps to {module:storage/bucket#acl.delete }.
148+ * @alias acl.default.delete
149+ */
150+ var aclDefaultDelete = true ;
151151
152- /**
153- * Maps to {module:storage/bucket#acl.update}.
154- * @alias acl.default.update
155- */
156- var aclDefaultUpdate = true ;
157- /* jshint ignore:end */
152+ /**
153+ * Maps to {module:storage/bucket#acl.get}.
154+ * @alias acl.default.get
155+ */
156+ var aclDefaultGet = true ;
157+
158+ /**
159+ * Maps to {module:storage/bucket#acl.update}.
160+ * @alias acl.default.update
161+ */
162+ var aclDefaultUpdate = true ;
163+ /* jshint ignore:end */
164+ }
158165
159166/**
160167 * Delete the bucket.
0 commit comments