Skip to content

Task - RBAC AuthZ - Implement migration script for turning legacy role assignations to openedx-authz assignations. #179

Closed

Description

@rodmgwgu

Implement migration scripts for turning legacy Course Authoring role assignations to openedx-authz assignations.

Document script usage and rollback strategy in Wiki and repo docs.

2 scripts need to exist:

  1. To migrate legacy policies to the new AuthZ system (manage.py cms authz_migrate_course_authoring)
  • Equivalent policies should exist in AuthZ system, create blank ones if they are not yet defined
  1. To migrate back from the new AuthZ system to the legacy migrations (manage.py cms authz_rollback_course_authoring)
  • Only support equivalent policies, ignore new policies but output a warning message on the script execution if one found
  • Should check for existing assignations so no duplicates are created

Both should be callable as manage.py commands.

The first script should be made in such a way that it can be integrated into an automatic migration (see existing libraries migration)

The roles that will apply for migrations are:

  • Admin
  • Staff
  • Limited Staff
  • Data Researcher

Resources:

Example migration function, used for libraries permissions: https://github.com/openedx/openedx-authz/blob/main/openedx_authz/engine/utils.py#L77

Please note that in a migration context, you don't have access to the full ORM model.

Activity

  1. moved this to In Grooming in RBAC AuthZ Boardon Jan 19, 2026
  2. added
    verawood
    on Jan 19, 2026
  3. moved this from In Grooming to Ready for Development in RBAC AuthZ Boardon Jan 22, 2026
  4. moved this from Ready for Development to In Progress in RBAC AuthZ Boardon Feb 12, 2026
  5. moved this from In Progress to Ready for review in RBAC AuthZ Boardon Mar 3, 2026
  6. moved this from Ready for review to Done in RBAC AuthZ Boardon Mar 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

verawood

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions