You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use asset-level permissions to implement global_write. (#19)
This introduces an asset-level ..permissions file containing uploaders that are
appended to the project-level permissions during an upload request. It reduces
the size of the project-level ..permissions when global_write is enabled, as we
don't accumulate everyone's asset permissions into the same file. This should
improve scalability for projects that have lots of different uploaders.
Copy file name to clipboardexpand all lines: README.md
+10-2
Original file line number
Diff line number
Diff line change
@@ -112,9 +112,14 @@ This is a JSON-formatted file that contains a JSON object with the following pro
112
112
If not specified, the uploader is untrusted by default.
113
113
-`global_write` (optional): a boolean indicating whether "global writes" are enabled.
114
114
With global writes enabled, any user of the filesystem can create a new asset within this project.
115
-
Once the asset is created, its creating user is added to the `uploaders` array with `asset` set to the name of the new asset and `trusted` set to `true`.
115
+
Once the asset is created, its creating user is added as a trusted uploader to the `{project}/{asset}/..permissions` file (see below).
116
116
If not specified, global writes are disabled by default.
117
117
118
+
Additional uploader permissions for a specific asset can be specified in a `{project}/{asset}/..permissions` file.
119
+
This should be a JSON-formatted file that contains a JSON object with the `uploaders` property as described above.
120
+
Specifying an uploader in this file is equivalent to specifying an uploader in the project-level permissions with the `asset` property set to the name of the relevant asset.
121
+
During [upload requests](#uploads-and-updates), any `uploaders` in this file will be appended to the `uploaders` in `{project}/..permissions` before authorization checks.
122
+
118
123
User identities are defined by the UIDs on the operating system.
119
124
All users are authenticated by examining the ownership of files provided to the Gobbler.
120
125
Note that, when switching from the Gobbler to **gypsum**, the project permissions need to be updated from UIDs to GitHub user names.
@@ -230,9 +235,12 @@ This ensures that the Gobbler instance is able to free up space by periodically
230
235
Users should create a file with the `request-set_permissions-` prefix, which should be JSON-formatted with the following properties:
231
236
232
237
-`project`: string containing the name of the project.
233
-
-`permissions`: an object containing either or both of `owners` and `uploaders`.
238
+
-`asset` (optional): string containing the name of an asset.
239
+
If provided, asset-level uploader permissions will be modified instead of project-level permissions.
240
+
-`permissions`: an object containing zero, one or more of `owners`, `uploaders` and `global_write`.
234
241
Each of these properties has the same type as described [above](#permissions).
235
242
If any property is missing, the value in the existing permissions is used.
243
+
If `asset` is provided, only `uploaders` will be used.
236
244
237
245
On success, the permissions in the registry are modified.
238
246
The HTTP response will contain a JSON object with the `status` property set to `SUCCESS`.
0 commit comments