Skip to content

Channel-Org Migration UI #6133

Description

@ArthurMousatov

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

Overview

Complexity: Medium
Target branch: unstable

The goal of this issue is to establish a way to migrate channels to organizations through studio's UI.

Context

This issue has two sections that need implementation:

  1. Regular users need to be able to add channels to organizations via the channel edit page.
    • When a user selects an organization from a dropdown, the API will check if this creates a contested migration.
    • If the API finds that this migration is contested, the user cannot save the organization to the channel right away.
      • The user is then offered to create a contested migration request, which will be fulfilled by the web administrators.
      • If a contested migration is created, then the channel is blocked from further organization changes until the previous migration is resolved (either accepted by the web administrators, or declined by the admins/original requestor)
    • If the API finds that this migration is not contested, the user can save the organization to the channel right away.
    • In case of an emergency (channel with no editors, for example), Website administrators need the ability to change a channel's organization property directly.
  2. Website administrators need the ability to handle contested migrations via the administration page.
    • Admins should be able to see the channel, the organization and the original requestor for all contested migrations.
    • Admins should be able to decline, or accept the contested migration.

The above will require changes to both the frontend, and the backend.

How to Get There

Frontend

  • Figma designs here

Backend

  • To check for a potential contested migration, the Channel viewset will offer a route that checks if a channel is considered uncontested based on these conditions:
    • The requesting user is a website administrator
    • OR
    • The channel's existing editors are ALL editors or admins of the given organization
  • Channel viewset can only directly update the organization property if and only if:
    • The given organization migration is not contested (see above conditions)
    • No contested migration exists for the given channel
  • A contested migration does not involve any new models/viewsets - it is simply an invitation object with both channel + organization set as targets.
    • Only web admins, or channel editors (that are also editors or admins in the target organization) may create contested migrations.
    • Only web administrators may approve contested migrations.
    • Original requestor can still decline the migration.
    • If a migration is approved, then the invitation updates the channel's organization property with the target organization.

Acceptance Criteria

Frontend

  • Implement given Figma designs

Backend

  • Implement the required backend routes to fulfill Figma designs

Accessibility and i18n

  • All accessibility / i18n processes are respected

Frameworks

  • Kolibri Design is used across new pages
  • Do not use Vuex on any part of the implementation (and if required, consult team)
  • Do not use Vuetify, use the Kolibri Design System or equivalent custom components

Testing

  • Add unit tests for new backend functionality
  • Add frontend tests for new frontend functionality

AI usage

No AI was used in the writing and designing of this issue.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions