Skip to content

Show license audit and special permissions checks in the Submit to Community Library Side Panel #5449

@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

As part of the #5448 issue, we will be creating a new license audit task that will set the invalid licenses and special permissions of a channel snapshot. In this issue, we'll invoke that task, and show in the Submit to Community Library Side Panel the result of that task.

Technical details

  1. We will wait until the channel being published loader is finished (in case it was) before doing anything else.
  2. We need to check the published_data object and check in the current version object if the community_library_invalid_licenses and community_library_special_permissions arrays have been set (or if they have been set to null). If they are already set, then there is no need to invoke the task.
  3. If these fields have not been set yet, then enqueue the task with the action created in Create license audit task and special permissions model #5448, and do a QueryLive on the channel until these fields are set.
  4. Once they are set, the descriptions of the community_library_special_permissions array should be loaded
    4.1. For this, a new AuditedSpecialPermissionsLicenseViewset should be created; this viewset should be filterable by the distributable and by_ids fields.
    4.2. The side panel modal should load the license descriptions of the special permissions that have not been marked as distributable yet. There are the only ones that will be presented in the UI.
  5. The following updates be presented on the Submit to Community Library Side Panel:
Description Spec
When the task is loading show the following loader in the side panel Image
If the community_library_invalid_licenses field is null, then show the included_licenses field in a success box notice Image
If the community_library_invalid_licenses field is set, then show all invalid licenses in a warning box notice Image
If the community_library_special_permissions array is set, and there are descriptions that have not been marked as distributable yet, then show these permissions in a box like the following. For this create a new component that accepts the list of descriptions, and show the paginated checkbox list of descriptions. Image
  1. The user must check all the checkbox list entries to enable the submit button.

Acceptance criteria

  • The license audit task is being invoked in the side panel.
  • Proper Box notice is shown depending on the existence of invalid licenses.
  • Proper license descriptions are loaded if the field is set.
  • Submit button remains disabled until all special permissions checks are checked.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions