Skip to content

User - Organization - Channel Edit Permissions #6123

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

As Organizations and Channels are finally being connected, we need to find a way to merge permissions between these two models. Currently, Channels are owned via the editor property, but once they are part of an organization, channel editors need to include organization editors and admins.

Complexity: Low
Target branch: unstable

The Change

Whenever the API needs to check for a user's editable channels, it should consider the channels that are part of a user's organization(s). If he has edit/admin access in the organization, any channels part of the organization should be editable by the user.

How to Get There

Whenever the API checks for channel EDIT permissions, or tries to find a user's editable channels. This is usually done via Channel.filter_edit_query_set() or Channel.editors (commonly used as User.editable_channels).

Acceptance Criteria

General

  • Channel Edit Querysets now consider edit rights through organization channels/roles
  • Usage of User.editable_channels or Channel.editors is replaced with a combination of the original Channel.editors check + organization-wide check

AI usage

AI was used to gather a few code requirements across the code base (usage of edit permissions)

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