Skip to content

Grant Library Admin when Creating a Library #111

@MaferMazu

Description

@MaferMazu

Description

When a user creates a content library, they should automatically be granted the library_admin role for that library. This role corresponds to the existing ADMIN access level defined in the https://openedx.atlassian.net/wiki/spaces/OEPM/pages/5252317270/Libraries+Roles+and+Permissions+Migration+Plan ensuring consistent privileges between the legacy and new authorization systems.

The goal of this issue is to implement that automatic role assignment during library creation. This only covers the creation and assignment logic; the actual permission checks for library_admin and other roles will be handled in a separate issue and PR.

Acceptance Criteria

  • When a user creates a content library, they are automatically granted the library_admin role for that library.
  • The assigned role is stored in the new authorization framework (Casbin-based system).
  • Existing library behavior remains unchanged (no new access checks introduced).
  • The role mapping is consistent with the Libraries Roles and Permissions Migration Plan.
  • Unit tests verify that the correct role (library_admin) is granted upon library creation.

Metadata

Metadata

Labels

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions