Skip to content

WP role mapping (built-in + custom) #199

@tayebmokni

Description

@tayebmokni

Summary

Map WP roles to gonext roles per doc 08 §7.3. Built-in WP roles map 1:1 to our canonical slugs (administrator, editor, author, contributor, subscriber; multisite super-admin → super_admin reserved). Custom WP roles are best-effort: diff the capability set against our built-in roles and pick the closest match + a warning. Exact custom-role replication is v2.

Design reference

  • docs/08-migration-compat.md §7.3

Acceptance criteria

  • Reads wp_options.wp_user_roles (deserialized PHP)
  • Maps built-in WP roles to canonical gonext slugs per §7.3 table
  • Use administrator slug (not admin); include super_admin reserved slot (matches doc 06 §6.1 seed)
  • Custom roles: capability diff → best-match built-in role + custom_role_best_match warning
  • migration_warnings includes the original capabilities for v2 exact replication
  • Tests cover all built-in roles + a synthetic custom role

Dependencies

#users-phpass

Complexity

M

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:authAuthentication & authorizationarea:migrationWordPress importer + compatphase:P5-migrationPhase 5 — Migrationpriority:P1Important — should land in phaseskill:goGo programmingtype:featNew feature or implementation task

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions