Repository navigation
Description
Description
openedx-authz is reorganizing its built-in permission and role definitions into applets (see #550). The supported import path for these constants is now openedx_authz.authz, while openedx_authz.constants.permissions and openedx_authz.constants.roles remain only as compatibility re-exports. Some code, tests, and documentation inside this repository still reference the legacy paths as if they were the primary entry point. They should follow the same guidance we give to clients so the legacy modules can eventually be deprecated and removed without surprises.
Current Behavior
src/openedx_authz/tests/test_migrations.pyimports role constants fromopenedx_authz.constants.roles.src/openedx_authz/tests/test_imports.pyimportspermissionsandrolesfromopenedx_authz.constantsand uses module aliases rather than direct names fromopenedx_authz.authz.- Applet READMEs and docs mention the legacy paths in ways that are not always clearly marked as compatibility-only:
src/openedx_authz/applets/*/README.rstdocs/references/built-in-constants.rstdocs/decisions/0032-applets-for-built-in-authorization-capabilities.rst
Expected Behavior
Code and tests in this repository import built-in constants directly by name from openedx_authz.authz. The only intentional references to openedx_authz.constants.permissions and openedx_authz.constants.roles are the compatibility modules themselves, the tests that verify they keep working, and the documentation that explains they are compatibility exports.
Acceptance Criteria
- No module under
src/openedx_authz/imports fromopenedx_authz.constants.permissionsoropenedx_authz.constants.roles, except the compatibility modules themselves and the tests that explicitly verify them. - Imports use direct names from
openedx_authz.authz, not module aliases. -
src/openedx_authz/tests/test_migrations.pyimports its role constants fromopenedx_authz.authz. - Tests that intentionally cover the legacy paths are clearly labeled as compatibility tests.
- Applet READMEs and docs consistently describe
openedx_authz.authzas the supported path and the legacy modules as compatibility exports. - Existing tests pass without behavior changes.
Out of Scope
- Removing the
openedx_authz.constants.permissionsandopenedx_authz.constants.rolesmodules. - Migrating other repositories, such as openedx-platform (tracked in Migrate openedx-platform imports to
openedx_authz.authz#618).
Related Issues
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity