openedx / modular-learning

3 stars 1 forks source link

[Libraries] [Collections] [Backend] REST CRUD API for Collections in v2 Libraries #226

Closed bradenmacdonald closed 3 days ago

bradenmacdonald commented 1 month ago
  1. Define new CRUD REST API to be able to query/manipulate the instances of the newly created Collection Model (https://github.com/openedx/modular-learning/issues/225).
  2. These should be defined in edx-platform (in the content_libraries django app) to handle permission checks and interface with the Collection model defined in openedx_learning repo.
    • Similar to how the taxonomy views and apis are implemented.
    • For permissions, use the ContentLibrary associated with the Collection's LearningPackage to determine the user's permissions on the Collection. If the LearningPackage is not associated with a ContentLibrary, raise an error.
  3. We also need to emit events when collections are created/edited/updated, which will require adding new event & data types to https://github.com/openedx/openedx-events
pomegranited commented 1 month ago

@bradenmacdonald To clarify: we should use the ContentLibrary associated with the Collection's LearningPackage to determine the user's permissions on the Collection?

bradenmacdonald commented 1 month ago

@pomegranited Yes, exactly. And if the LearningPackage is something other than a content library: throw an error.