Context
Part of the generic _access mechanism — see adapt-security/adapt-authoring-api#98.
Summary
Refactor the existing group-based sharing to use the new _access structure:
- Create a schema extension that adds
_access.users (array of user IDs) and _access.groups (array of group IDs) to registered modules
- Update
registerGroupModule (or rename to registerSharingModule) to extend with the new schema and tap accessCheckHook for both _access.users and _access.groups checks
- Replace the current
userGroups top-level field with _access.groups
- Replace the current
usergroups.schema.json extension with the new _access-based extension
- Update
hasGroupAccess to read from resource._access.groups
- Add
hasUserAccess utility for _access.users check
Dependencies
Context
Part of the generic
_accessmechanism — see adapt-security/adapt-authoring-api#98.Summary
Refactor the existing group-based sharing to use the new
_accessstructure:_access.users(array of user IDs) and_access.groups(array of group IDs) to registered modulesregisterGroupModule(or rename toregisterSharingModule) to extend with the new schema and tapaccessCheckHookfor both_access.usersand_access.groupschecksuserGroupstop-level field with_access.groupsusergroups.schema.jsonextension with the new_access-based extensionhasGroupAccessto read fromresource._access.groupshasUserAccessutility for_access.userscheckDependencies