Skip to content

New: Extend _access with users and groups keys #46

@taylortom

Description

@taylortom

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions