Repository navigation
Description
Description
openedx-authz is organizing its built-in definitions into applets (see #550). As part of that change, the public entry point for the built-in permission and role constants becomes openedx_authz.authz. The old openedx_authz.constants.permissions and openedx_authz.constants.roles modules remain only as compatibility re-exports, and new code is expected to import from openedx_authz.authz.
openedx-platform still imports these constants through the legacy modules, so it depends on a path that is documented as compatibility-only. This issue tracks migrating those imports so that openedx-platform follows the supported API and is not affected if the compatibility modules are later deprecated or removed.
Current Behavior
openedx-platform imports permission and role constants from the legacy modules:
from openedx_authz.constants.permissions import COURSES_VIEW_COURSE
from openedx_authz.constants.roles import COURSE_ADMINExpected Behavior
All openedx-platform code, including tests, imports the constants from the supported entry point:
from openedx_authz.authz import COURSE_ADMIN, COURSES_VIEW_COURSEAcceptance Criteria
- No module in openedx-platform imports from
openedx_authz.constants.permissionsoropenedx_authz.constants.roles. - Imports are written as direct names from
openedx_authz.authz, not through module aliases. - Code that relied on
*_PERMISSIONSlists or on the permissions carried by role constants is updated, for example to useget_permissions_for_single_role. -
openedx-authzis pinned to a release that exposesopenedx_authz.authz, and the requirements files are regenerated. - Existing tests pass without behavior changes.
Technical Notes
- Role constants such as
COURSE_ADMINareRoleDataidentifiers without a permissions list. Any usage that read their permissions needs to change. - The
*_PERMISSIONSlists andCOURSES_CREATE_COURSEare removed in openedx-authz#550. - A grep for
openedx_authz.constantsover the repository is enough to confirm that no legacy import remains.
Related Issues
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity