Skip to content

Migration Script #89

Closed
Closed

Description

@MaferMazu
No description provided.

Activity

  1. self-assigned this
    on Oct 8, 2025
  2. added
    MVPRequired for an MVP release of this feature
    on Oct 22, 2025
  3. moved this to Ready for Development in RBAC AuthZ Boardon Oct 22, 2025
  4. moved this from Ready for Development to Blocked in RBAC AuthZ Boardon Oct 22, 2025
  5. bmtcril commented on Oct 30, 2025

    @bmtcril
    Contributor

    Just noting that there is a preference to make this a data migration instead of something like a management command.

  6. rodmgwgu commented on Nov 3, 2025

    @rodmgwgu
    Contributor

    @MaferMazu Is this still blocked? I would like to work on this.

  7. rodmgwgu commented on Nov 3, 2025

    @rodmgwgu
    Contributor

    I did some research on this, here are my findings:

    The old Library permissions are stored in the ContentLibraryPermission model, it consists of the following columns:

    • library: FK to ContentLibrary
    • user: optional FK to User
    • group: optionak FK to Group
    • access_level: 'admin' | 'author' | 'read'

    In the new Authz model, this would roughly translate to:

    • library: scope
    • user: subject
    • access_level: role

    Now, we don't have an equivalent concept to "Group", what should we do in this case? should we just go through the users in the group and assign roles independently?

  8. bmtcril commented on Nov 4, 2025

    @bmtcril
    Contributor

    @rodmgwgu that's probably a @jmakowski1123 question, but I would guess that we would have to to it the way you said or ignore groups altogether. I'd also like to clarify the order of operations for operators upgrading to Ulmo to make sure I understand things correctly.

    1. Do the upgrade: at this point only staff and superusers have access to libraries, other old permissions cease to have any effect, and there is no UI to update them
    2. Run the migration script: at this point all users have the permissions they had before the upgrade
    3. In Verawood we drop the old tables

    Does this sound correct to everyone? cc @MaferMazu @mariajgrimaldi

  9. mariajgrimaldi commented on Nov 4, 2025

    @mariajgrimaldi
    Member

    Sorry I missed your comments!

    @rodmgwgu I don’t remember why this was blocked, but I think you can go ahead and start working on it. Mafer will let us know if there’s anything else we need.

    Now, we don't have an equivalent concept to "Group", what should we do in this case? Should we just go through the users in the group and assign roles independently?

    That makes sense to me. "Group" might just be their notion of a role (a way of grouping users): https://github.com/openedx/edx-platform/blob/master/openedx/core/djangoapps/content_libraries/permissions.py#L18-L35

    Thanks!

    @bmtcril Sounds good to me!

  10. rodmgwgu commented on Nov 4, 2025

    @rodmgwgu
    Contributor
    1. Do the upgrade: at this point only staff and superusers have access to libraries, other old permissions cease to have any effect, and there is no UI to update them
    2. Run the migration script: at this point all users have the permissions they had before the upgrade

    Just to clarify, the migration would be implemented as a data migration, so it will be applied as part of the upgrade.

  11. moved this from Blocked to In Progress in RBAC AuthZ Boardon Nov 5, 2025
  12. moved this from In Progress to Done in RBAC AuthZ Boardon Nov 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

MVPRequired for an MVP release of this feature

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions