Skip to content

ESoCC: Set distributable Special Permissions Licenses #5627

@AlexVelezLl

Description

@AlexVelezLl

This issue is not open for contribution. Visit Contributing guidelines to learn about the contributing process and how to find suitable issues.

Overview

Until now, AuditedSpecialPermissionsLicenses are already set up and working as a double check for editors before creating Community Library Submissions. Now, we need to set the distributable field of these licenses to true when a CommunityLibrarySubmission is approved or when public Channels are published.

Technical details

  • On the AuditedSpecialPermissionsLicense model, add a new @classmethod method mark_channel_version_as_distributable, this method will receive a channel_version_id, and will set distributable=True to all AuditedSpecialPermissionsLicense whose channel_versions include that channel_version_id.
  • Call AuditedSpecialPermissionsLicense.mark_channel_version_as_distributable in the add_to_community_library method after export_channel_to_kolibri_public.
    • For this, query the ChannelVersion object using the channel_id and channel_version properties.
  • Call AuditedSpecialPermissionsLicense.mark_channel_version_as_distributable in the publish workflow if the channel being published is public, after this line.
    • For this, we can use the channel.version_info to get the current ChannelVersion object.
  • Unit tests should be added for both workflows.

Acceptance criteria

  • AuditedSpecialPermissionsLicense records are marked as distributable after approving a Community Library Submission, and after a public channel is published.
  • Unit tests have been added.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P0 - criticalPriority: Release blocker or regression

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions