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

Overview
The AuditedSpecialPermissionsLicense model stores the description of special permissions to ensure that they can be distributed in our public libraries. Since public channels already hold nodes with special permissions, they need to be declared as distributable in our system.
Technical details
- Create a new command on
contentcuration/contentcuration/management/commands/set_distributable_special_permissions.py.
- Query all
kolibri_public.models.ContentNode whose license_name is licenses.SPECIAL_PERMISSIONS.
- Extract their
license_description field using .distinct() to get uniques descriptions, exclude empty descriptions.
- Create new
AuditedSpecialPermissionsLicense objects with all these descriptions, setting distributable=True, and then call AuditedSpecialPermissionsLicense.objects.bulk_create to bulk insert all these objects in the database. Similar to this.
Acceptance criteria
- A new
set_distributable_special_permissions command is created.
- After running this command, all special license descriptions of public ContentNodes are stored in the
AuditedSpecialPermissionsLicense model with distributable=True.
- Unit tests have been added.
❌ This issue is not open for contribution. Visit Contributing guidelines to learn about the contributing process and how to find suitable issues.
Overview
The
AuditedSpecialPermissionsLicensemodel stores the description of special permissions to ensure that they can be distributed in our public libraries. Since public channels already hold nodes with special permissions, they need to be declared as distributable in our system.Technical details
contentcuration/contentcuration/management/commands/set_distributable_special_permissions.py.kolibri_public.models.ContentNodewhoselicense_nameislicenses.SPECIAL_PERMISSIONS.license_descriptionfield using.distinct()to get uniques descriptions, exclude empty descriptions.AuditedSpecialPermissionsLicenseobjects with all these descriptions, settingdistributable=True, and then callAuditedSpecialPermissionsLicense.objects.bulk_createto bulk insert all these objects in the database. Similar to this.Acceptance criteria
set_distributable_special_permissionscommand is created.AuditedSpecialPermissionsLicensemodel withdistributable=True.