diff --git a/lib/AssetsModule.js b/lib/AssetsModule.js index 3b9db68..fb5448d 100644 --- a/lib/AssetsModule.js +++ b/lib/AssetsModule.js @@ -22,10 +22,14 @@ class Assetsmodule extends AbstractApiModule { this.assetTypes = { [LocalAsset.name]: LocalAsset } await this.ensureLibPermissions() - const [authored, mongodb, tags] = await this.app.waitForModule('authored', 'mongodb', 'tags') + const [authored, mongodb, tags, users] = await this.app.waitForModule('authored', 'mongodb', 'tags', 'users') await mongodb.setIndex(this.collectionName, 'hash') await authored.registerModule(this, { accessCheck: false }) await tags.registerModule(this) + // opt into the generic _access model: public access (base) plus per-user sharing. + // Group sharing is wired from the usergroups module. See adapt-authoring-api#98. + await this.enableAccessControl() + await users.registerUserModule(this) this.router.addMiddleware(this.fileUploadMiddleware) this.requestHook.tap(this.onRequest.bind(this))